You are here: Home » Anonymity » autovpn


autovpn Description

autovpn is a tool to automatically connect you to a random VPN in a country of your choice. It uses openvpn to connect you to a server obtained from VPN Gate.


Author: Adhityaa Chandrasekar

License: GPLv3

autovpn Help

The program does not have options. As argument you enter ISO 3166-1 alpha-2 (the two-letter country code, through whose VPN you want to connect).

If after starting the program quickly quits without connecting to the VPN, this could mean:

  • You entered the country code incorrectly
  • Missing VPN from selected country

autovpn Usage Example

To become connected through a US VPN server execute

sudo autovpn

and you're done. You'll be connected to a server in the US.

You can give a country if you want. For example, if you want to connect to a server in Japan:

sudo autovpn JP

To verify your IP, run it at the command prompt:


Or open the page in a web browser:

To stop using VPN, press CTRL + c. The program asks if you want to try another VPN, if you want to reconnect via another VPN server, then press y, if you want to quit the program, type n.

How to install autovpn

Installation on Kali Linux

It is necessary to have the Go compiler installed.

echo 'export GOPATH=/home/git/go' >> ~/.bashrc
echo 'export GOROOT=/usr/local/src/go' >> ~/.bashrc
echo 'export PATH=${PATH}:$GOROOT/bin' >> ~/.bashrc
source ~/.bashrc
wget `curl -s | grep -E -o 'https://[a-z0-9./]{5,}go[0-9.]{3,}linux-amd64.tar.gz' | head -n 1`
tar zxf go*.linux-amd64.tar.gz
sudo mv go $GOROOT

Once the Go compiler installed, execute:

sudo apt-get install openvpn
git clone
cd autovpn
go build autovpn.go
sudo mv autovpn /usr/local/bin/

autovpn Screenshots

autovpn Tutorials

Related tools