Update menu.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent d0d43c2756
commit 59e2e8ff14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      menu.sh

@ -818,6 +818,7 @@ onoff(){
proxy_onoff(){ proxy_onoff(){
! type -P warp-cli >/dev/null 2>&1 && red " ${T[${L}93]} " && exit 1 ! type -P warp-cli >/dev/null 2>&1 && red " ${T[${L}93]} " && exit 1
if systemctl is-active warp-svc >/dev/null 2>&1; then if systemctl is-active warp-svc >/dev/null 2>&1; then
[[ ! $(warp-cli --accept-tos settings) =~ WarpProxy ]] && ( ip -4 rule delete from 172.16.0.2/32 lookup 51820; ip -4 rule delete table main suppress_prefixlength 0 )
systemctl stop warp-svc systemctl stop warp-svc
green " ${T[${L}91]} " && exit 0 green " ${T[${L}91]} " && exit 0
@ -834,7 +835,9 @@ proxy_onoff(){
[[ -n "$QUOTA" ]] && green " ${T[${L}63]}$QUOTA " [[ -n "$QUOTA" ]] && green " ${T[${L}63]}$QUOTA "
exit 0 exit 0
else INTERFACE='--interface CloudflareWARP' && ip4_info else INTERFACE='--interface CloudflareWARP'
ip -4 rule add from 172.16.0.2 lookup 51820; ip -4 route add default dev CloudflareWARP table 51820; ip -4 rule add table main suppress_prefixlength 0
ip4_info
[[ $L = C && -n "$COUNTRY4" ]] && COUNTRY4=$(translate "$COUNTRY4") [[ $L = C && -n "$COUNTRY4" ]] && COUNTRY4=$(translate "$COUNTRY4")
ACCOUNT=$(warp-cli --accept-tos account 2>/dev/null) ACCOUNT=$(warp-cli --accept-tos account 2>/dev/null)
if [[ $ACCOUNT =~ 'Limited' ]]; then if [[ $ACCOUNT =~ 'Limited' ]]; then

Loading…
Cancel
Save