diff options
author | Saumit Dinesan <79687674+Saumit-D@users.noreply.github.com> | 2021-11-29 20:42:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 20:42:43 +0530 |
commit | 9f9950e6ed8ddfa8bfb698834a05cc6c0de9072b (patch) | |
tree | e07883d7dc7af3e39441c1991eb4de96945f6936 /scripts/vpn-menu | |
parent | e97636d1f6f35f9052e60dbc6dc8918010152bf9 (diff) |
Update vpn-menu
Diffstat (limited to 'scripts/vpn-menu')
-rw-r--r-- | scripts/vpn-menu | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/scripts/vpn-menu b/scripts/vpn-menu index 1862205..251fd7e 100644 --- a/scripts/vpn-menu +++ b/scripts/vpn-menu @@ -1,5 +1,28 @@ -#!/bin/sh +//doesnt work improve in future -vpnid=$(nmcli con | grep "vpn" | cut -d " " -f 1 | dmenu -p "Select VPN to activate/deactivate") -actdeact=$(echo "" | dmenu -p "Activate or Deactivate? (up or down)") -nmcli con $actdeact id $vpnid +#!/bin/sh +echo "Choose a country...1)US 2)NL 3)JP" +country=("US" "NL" "JP") +select chosen in "${country[@]}"; do + case $chosen in + "US") + echo "Choosing Fastest Virtualized Private American server" + usvpn=$(find /etc/openvpn/client/ -type f | shuf -n 1) + sudo openvpn /etc/openvpn/client/$usvpn + break + ;; + "NL") + echo "Choosing Fastest Virtualized Private NewZealand's server" + nlvpn=$(find /etc/openvpn/client/nl -type f | shuf -n 1) + sudo openvpn --config /etc/openvpn/client/$nlvpn + break + ;; + "JP") + echo "Choosing Fastest Virtualized Private Japanese server" + jpvpn=$(find /etc/openvpn/client/jp -type f | shuf -n 1) + sudo openvpn --config /etc/openvpn/client/$jpvpn + break + ;; + *) echo "invalid option $REPLY";; + esac +done |