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

17 lines
309 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;;
*)
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)