Skip to content

Instantly share code, notes, and snippets.

@dyoungwd
Last active January 30, 2020 11:11
Show Gist options
  • Save dyoungwd/8046bf0267a94a94dd0bb82b9013f67e to your computer and use it in GitHub Desktop.
Save dyoungwd/8046bf0267a94a94dd0bb82b9013f67e to your computer and use it in GitHub Desktop.
A VPN select script
#!/bin/bash
cd
echo "## Updating DNS....."
sudo cp resolv.conf ../../../etc/
echo "## Obtaining VPN info....."
cd vpn
read -n 1 -p "Select a VPN to connect to:
- Bulgaria(b)
- France(f)
- Germany(g)
- HongKong(h)
- Netherlands(n)
- Spain(c)
- Sweden(s)
- Switzerland(a)
- Russia(r)
- Ukraine(u)
- Torrents(t)
- Exit(enter)
Select (E/b/f/g/h/n/s/a/r/u/t) " ans;
case $ans in
b|B)
sudo openvpn --config "ShadeYouVPN.com Bulgaria-1 Sofia UDP-25000.ovpn";;
c|C)
sudo openvpn --config "ShadeYouVPN.com Spain TCP-443.ovpn";;
f|F)
sudo openvpn --config "ShadeYouVPN.com France-1 Paris UDP-25000.ovpn";;
g|G)
sudo openvpn --config "ShadeYouVPN.com Germany-1 Frankfurt TCP-443.ovpn";;
h|H)
sudo openvpn --config "ShadeYouVPN.com HongKong-1 TCP-443.ovpn";;
n|N)
sudo openvpn --config "ShadeYouVPN.com Netherlands-3 TCP-443.ovpn";;
s|S)
sudo openvpn --config "ShadeYouVPN.com Sweden-1 TCP-443.ovpn";;
a|A)
sudo openvpn --config "ShadeYouVPN.com Switzerland-1 Zurich UDP-53.ovpn";;
r|R)
sudo openvpn --config "ShadeYouVPN.com Russia-1 TCP-443.ovpn";;
u|U)
sudo openvpn --config "ShadeYouVPN.com Ukraine-2 Kharkov UDP-25000.ovpn";;
t|T)
sudo openvpn --config "ShadeYouVPN.com United Kingdom-2 torrent UDP-53.ovpn";;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment