This script allows to use the free VPN service provided by VPNGate in an easy way. The user just needs to provide the desidered output country, and the script automatically chooses the best server.
After this step, OpenVPN is launched with the proper configuration. The VPN can be terminated by pressing Ctrl+C.
Run the script by providing the desired output country:
vpngate.py US
Both country codes and country names are supported, as listed on the VPNGate website, e.g.:
vpngate.py "United Kingdom"
Moreover, the script allows to input countries with any case (Italy
, italy
, ItALy
all work) and with partial names:
Korea
will work forKorea Republic Of
Russia
will work forRussian Federation
- ... and so on
Here is a short Youtube video showcasing an example usage:
OpenVPN needs to be installed.
The script should run on any Linux distribution with the Python Requests module installed. The user running the script must be able to run sudo
commands in order to start openvpn
.