From c2c2a69afcca67e7d7133adfd2ba01ee56c19f8d Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Sat, 9 Apr 2022 15:18:27 +0800 Subject: [PATCH] Update unlock.sh --- unlock.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unlock.sh b/unlock.sh index 10f0528..4649f64 100644 --- a/unlock.sh +++ b/unlock.sh @@ -183,7 +183,7 @@ check_warp(){ # 在已安装 Client 的前提下,区分模式 Mode if type -P warp-cli >/dev/null 2>&1; then if [[ -e /etc/wireguard/luban ]]; then - if [[ ! $(ip a) =~ 'CloudflareWARP']]; then + if [[ ! $(ip a) =~ 'CloudflareWARP' ]]; then warp-cli --accept-tos connect >/dev/null 2>&1 warp-cli --accept-tos enable-always-on >/dev/null 2>&1 sleep 5 @@ -191,7 +191,7 @@ check_warp(){ ip -4 route add default dev CloudflareWARP table 51820 ip -4 rule add table main suppress_prefixlength 0 fi - [[ $(ip a) =~ 'CloudflareWARP']] && STATUS[2]=1 || STATUS[2]=0 + [[ $(ip a) =~ 'CloudflareWARP' ]] && STATUS[2]=1 || STATUS[2]=0 else [[ ! $(ss -nltp) =~ 'warp-svc' ]] && warp-cli --accept-tos connect >/dev/null 2>&1 [[ $(ss -nltp) =~ 'warp-svc' ]] && CLIENT_PORT=$(ss -nltp | grep warp-svc | grep -oP '127.0*\S+' | cut -d: -f2) && STATUS[2]=1 || STATUS[2]=0