summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-13 15:15:27 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-13 15:15:27 +0800
commit1877a9b42fb68a1d0bad6558d4327f278e9fb5fb (patch)
tree6dbfda8989dff87044ea8bf999fea4f48fe750c0 /sh
parent126a6dd5c06d8cdc47013f77a06bdf462b800e3e (diff)
vpn: remove aa
Diffstat (limited to 'sh')
-rwxr-xr-xsh/vpn12
1 files changed, 0 insertions, 12 deletions
diff --git a/sh/vpn b/sh/vpn
index 4375873..a7387ac 100755
--- a/sh/vpn
+++ b/sh/vpn
@@ -7,19 +7,8 @@ down_not_master () {
done
}
-wg_aa_restore_default () {
- # case seems faster than pipe to grep maybe because case is shell built-in, so I use case
- # if nmcli -t --fields device,state device | grep -q '^wg_aa:connected$'; then ...; fi
- case "$(nmcli -t --fields device,state device)" in
- # stop aa wireguard+swgp server that listen from insp wiregurad+swgp client, start aa wg+swgp connect to ca
- # use /usr/bin/alacritty instead of /home/xyz/.local/bin/alacritty so script can wait until alacritty exit to run other codes following
- *wg_aa:connected*) /usr/bin/alacritty -T aa --hold -e sh -c 'echo "Wait for aa sudo prompt and enter password, then manually close this window:"; ssh -t aawg "sudo systemctl stop wg-quick@wg0 && sudo systemctl start wg-quick@wg_ib"';;
- esac
-}
-
# no toggle wg_master, I want wg_master to always on by default
if ! [ "$1" ] || [ "$1" = master ]; then
- wg_aa_restore_default
down_not_master
nmcli connection up wg_master
notify-send -u critical 'VPN disabled'
@@ -27,7 +16,6 @@ if ! [ "$1" ] || [ "$1" = master ]; then
fi
if nmcli -t --fields device,state device | grep -q "^wg_$1:connected$"; then
- wg_aa_restore_default
down_not_master
nmcli connection up wg_master
notify-send -u critical "$1 VPN disabled"