/TugShuttle

TugShuttle is a command line tool that starts a DigitalOcean Droplet and tunnels your traffic to it over SSH. As the name suggests, it uses Tugboat and Sshuttle.

Primary LanguageShellMIT LicenseMIT

TugShuttle

Purpose

TugShuttle is a command line tool that starts a DigitalOcean Droplet and tunnels your traffic to it over SSH making it a temporary VPN. As the name suggests, it uses Tugboat to interface with DigitalOcean and Sshuttle to tunnel your traffic to the Droplet.

An example use case for a temporary VPN. Watching all of Blackadder would cost $0.09 in DigitalOcean credit. Art style "borrowed" from Randall Munroe (xkcd.com)

VPNs have many valid use cases and can be quite convenient at times, but they tend to require a monthly subscription. That is hard to justify if you almost never use it. What's special about TugShuttle tunnels is that it's really easy to quickly spin one up and down again without needing a monthly subscription for anything (as is the nature of DigitalOcean Droplets). Droplets only cost $0.007 per hour (not a typo, that's less than one cent) so watching a region locked movie only sets you back approximately one additional cent. It's pretty manageable.

Prerequisites / Dependencies

  1. A DigitalOcean account with some credit. Renting a Droplet is very cheap, but it's not free. If you don't have one, you can make an account here (note: this is a referral link, meaning you get $10 starting credit. If you don't feel comfortable using that, you can sign up on the non-referral page here)

  2. A valid SSH key linked to your DigitalOcean account. You can link one here. If you've never used SSH keys before, learn how to create them here.

  3. Sshuttle. It's in the repositories. You can also grab it from the Github page.

  4. Tugboat. Get it with "gem install tugboat" (requires Ruby)

Installation

Clone the repository and put "tugshuttle" in any folder in your $PATH.

Usage

tugshuttle $server, where $server is one of: ams1, ams2, ams3, fra1, lon1, nyc1, nyc2, nyc3, sfo1, sgp1, tor1. This connects you to a server in Amsterdam, Frankfurt, New York City, San Francisco, Singapore or Toronto respectively.

When Tugshuttle is first run and ~/.tugboat is not present / properly configured, the program will ask for an Access Token. You can find it here.

If no SSH key is linked to your DigitalOcean account, Tugshuttle will ask you to do that before continuing. You can link your SSH key here. If you've never used SSH keys before, read about how to generate and use them here.

Important: If Tugshuttle receives a SIGKILL, it will not be able to destroy the Droplet it created. If this happens, the Droplet will run until you manually destroy it. You can either do this via the DO website, using tugboat destroy tugshuttle or using tugshuttle clean.

License

:MIT LICENSE