nix-files/pkgs/sane-scripts/src/sane-vpn-up

19 lines
360 B
Plaintext
Raw Normal View History

#!/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)
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
echo plain: $(curl https://ipinfo.io/ip)
2022-07-09 07:48:09 +00:00
sudo systemctl start $iface
echo vpn: $(curl https://ipinfo.io/ip)