From 663b4c29a51b9fd28f21154ef90ebe39593fea16 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 3 Nov 2023 18:26:19 -0500 Subject: initial commit --- vpn.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 vpn.sh (limited to 'vpn.sh') 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 -- cgit v1.2.3-70-g09d2