summaryrefslogtreecommitdiff
path: root/vpn.sh
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2023-11-03 18:26:19 -0500
committerChristian Cleberg <hello@cleberg.net>2023-11-03 18:26:19 -0500
commit663b4c29a51b9fd28f21154ef90ebe39593fea16 (patch)
treeb4404f78341d2e90533d61756b22799f7b576c50 /vpn.sh
downloaddotfiles-663b4c29a51b9fd28f21154ef90ebe39593fea16.tar.gz
dotfiles-663b4c29a51b9fd28f21154ef90ebe39593fea16.tar.bz2
dotfiles-663b4c29a51b9fd28f21154ef90ebe39593fea16.zip
initial commit
Diffstat (limited to 'vpn.sh')
-rwxr-xr-xvpn.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/vpn.sh b/vpn.sh
new file mode 100755
index 0000000..cecbbb5
--- /dev/null
+++ b/vpn.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+ls /etc/wireguard/us-* |sort -R |tail -n 1 |while read file; do
+ # Replace `doas` with `sudo` if your machine uses `sudo`,
+ # or remove `doas` if users don't need to su to run wg-quick
+ wg-quick up $file;
+ printf "\nCreated Mullvad wireguard connection with file: $file";
+ printf "\n\nPrinting new IP info:\n"
+ curl https://am.i.mullvad.net/connected
+done