# This script is NOT MAINTAINED
This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made **only for Linux** and in Python 2, which has since become outdated.
I currently do not use it, and I suggest you avoid it as well. **Please do not expect support for using this script.**
🔥 If you need an alternative, [@glaucocustodio](https://github.com/glaucocustodio) has kindly suggested [EasyVPN](https://github.com/rodrigogs/easyvpn) in [this comment](https://gist.github.com/Lazza/bbc15561b65c16db8ca8?permalink_comment_id=4381847#gistcomment-4381847).
The rest of the README is left for historical purposed.
----
# vpngate.py
This script allows to use the free VPN service provided by [VPNGate](http://www.vpngate.net/en/) 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.
# Usage
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 for `Korea Republic Of`
- `Russia` will work for `Russian Federation`
- ... and so on
# Demo
Here is a short Youtube video showcasing an example usage:
[](http://youtu.be/3OFwxkxN_HI)
# Requirements
OpenVPN needs to be installed.
The script should run on any Linux distribution with the Python [Requests](python-requests.org) module installed. The user running the script must be able to run `sudo` commands in order to start `openvpn`.