Code Monkey home page Code Monkey logo

heroku-vpn's Introduction

Heroku VPN

Easily spin up an ephemeral VPN on heroku using tailscale under the hood


Disclaimer:

NEITHER me NOR this project shall be in any way held responsible if YOUR ACCOUNT gets banned. It is YOUR sole reponsibility to use this project in whatever way you may want. However I totally recommend AGAINST ABUSING these services with excessive usage.

Prerequisites:

Pre Deployment Guide:

  1. Signup on Tailscale.

    1 2

  2. Connect atleast one device following the tailscale Introduction guide.

    3

  3. Go to the Access Controls tab and save the following JSON into Edit file section, replacing x0rzavi@github with an appropriate value from Users tab.

    {
        "acls": [
          { "action": "accept", "src": ["*"], "dst": ["*:*"] },
        ],
        "tagOwners": {
          "tag:vpn": ["x0rzavi@github"],
        },
        "autoApprovers": {
          "exitNode": ["tag:vpn"],
        }
    }

    4 7

  4. Go to Keys section in Settings tab and generate an auth key. Paste this key into heroku when asked for. Also save it for future use.

    5 6

Deployment:

Deploy

Post Deployment guide:

  1. Open tailscale client on the device you want to use VPN. (Guide shows for android)

    A

  2. Connect your client to tailscale.

  3. Tap Use exit node and select the correct online machine after checking in tailscale dashboard

    B C

  4. VPN should start working.

    D

Notes:

  • Make sure, you have followed the steps as precisely as possible.
  • As always, heroku dynos will sleep after a certain amount of time. This repo has no hardcoded way to circumvent that (who needs a VPN 24/7 anyways ?) but it does serve a site which you can ping. So, it is totally upto YOU how you want to keep it running. Few utilities worth noting are:
  • Each time your heroku app restarts, a new machine will pop up in tailscale dashboard and the old offline ones will disappear eventually. YOU have to make sure to choose the correct exit node each time, failing which will block your internet.
  • Tailscale is a great tool in itself with extensive documention, make sure to try it.

Todo:

  • V2 with native wireguard implementation. (iff possible)
  • Support for VPN on github-actions.

Contact:

heroku-vpn's People

Contributors

x0rzavi avatar amirulandalib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.