Very generic PHP script to grab a VPN from and connect to it. Linux only.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Very Simple VPN Gate Script

This is an extremly simple script to connect to a VPN from the service. The script currently only runs on Linux,requires openvpn, and sudo in order to run.

Example usage to connect to a specific country (South Korea, in this case):

sudo php vpngate.php -c kr
Attempting to connect to KR -
Connected to KR - successfully.

Example usage to check the status of any current VPN connection on the system (this is interactive)

sudo php vpngate.php -c kr -s
VPN is running. Kill it? [y/yes/n/no]: y
VPN is not running. Start one? [y/yes/n/no]: y
Attempting to connect to KR -
Connected to KR - successfully.

You can opt to leave off a country, in that case the script will try the very first VPN in the list.

If the script is unable to connect to a VPN it will continue throughout the list until it runs out of options for either the selected country or every entry returned from the service.