2022-06-22 23:08:58 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-07-09 07:48:09 +00:00
|
|
|
|
|
|
|
# first arg should be the region, e.g. `us` or `ukr`
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
ukr)
|
|
|
|
iface=wg-quick-ovpnd-ukr;;
|
|
|
|
us)
|
2022-07-09 07:52:05 +00:00
|
|
|
iface=wg-quick-ovpnd-us;;
|
2022-12-13 03:26:23 +00:00
|
|
|
us-atlanta)
|
|
|
|
iface=wg-quick-ovpnd-us-atlanta;;
|
2022-07-09 07:48:09 +00:00
|
|
|
*)
|
|
|
|
echo "invalid vpn name '$1'"; exit 1;;
|
|
|
|
esac
|
|
|
|
|
2022-06-22 23:08:58 +00:00
|
|
|
echo plain: $(curl https://ipinfo.io/ip)
|
2022-07-09 07:48:09 +00:00
|
|
|
sudo systemctl start $iface
|
2022-06-22 23:08:58 +00:00
|
|
|
echo vpn: $(curl https://ipinfo.io/ip)
|