Bash script for quickly connecting to VPN Gate free VPN

adnan360 0f688ad9e8 Add support for extra openvpn CLI parameters 3 gadi atpakaļ
data ffc9cc774a Initial commit 3 gadi atpakaļ
inc 2e5a640449 Apply fixes for OpenBSD 3 gadi atpakaļ
run 77615ed17e Initial implementation of scripts 3 gadi atpakaļ
.gitignore 77615ed17e Initial implementation of scripts 3 gadi atpakaļ
LICENSE 631488f6bf Initial commit 3 gadi atpakaļ
README.md 77615ed17e Initial implementation of scripts 3 gadi atpakaļ
config.sample.sh 0f688ad9e8 Add support for extra openvpn CLI parameters 3 gadi atpakaļ
connect.sh 0f688ad9e8 Add support for extra openvpn CLI parameters 3 gadi atpakaļ
fetch.sh 2e5a640449 Apply fixes for OpenBSD 3 gadi atpakaļ

README.md

gatekeeper

Bash script for quickly connecting to VPN Gate's free VPN

Plain, simple script to connect to the free VPN service VPN Gate. It works with basic tools which are commonly available on any system. Doesn't even require network-manager.

Usage

git clone --depth 1 https://notabug.org/adnan360/gatekeeper.git
cd gatekeeper
./fetch.sh
./connect.sh

Press Ctrl+C when you want to disconnect.

Configure

Configuration is optional.

cp -i config.sample.sh config.sh
$EDITOR config.sh

Scripts

You can run custom scripts when vpn is connected or disconnected. This is handy for customization, firewall tightening etc. Possibilities are endless. Create up.sh and down.sh right inside data directory, make them executable.

data/up.sh

#!/usr/bin/env bash
echo 'UPPP!!!'

data/down.sh

#!/usr/bin/env bash
echo 'DOWNNN!!!'

Now connect and disconnect to see if the above messages appear. You can use contents created inside run directory to use in these scripts if you need it.

  • vpn_device: stores the device through which VPN is connected. e.g. tun0
  • vpn_ip: stores the remote ip that is connected to.
  • vpn_port: stores the remote port that is connected to.

Requirements

  • bash
  • curl or wget
  • base64
  • openvpn

License

GPLv2