Fix can't share wifi spot with others on the latest v2ray

Signed-off-by: Xu Tianliang <yorutsuki@live.com>
This commit is contained in:
Xu Tianliang 2022-01-02 03:36:15 +08:00
parent 579ebdc018
commit 2fdd6b8c39

View File

@ -47,7 +47,7 @@ find_netstat_path() {
probe_v2ray_listen() { probe_v2ray_listen() {
find_netstat_path || return find_netstat_path || return
v2ray_listen=`netstat -tnlp | grep v2ray | grep LISTEN` v2ray_listen=`netstat -tnlp | grep v2ray | grep LISTEN`
if eval "echo \"${v2ray_listen}\" | grep -q :::${proxy_port}" || eval "echo \"${v2ray_listen}\" | grep -q 0.0.0.0:${proxy_port}" ; then if eval "echo \"${v2ray_listen}\" | grep -q :::${proxy_port}" || eval "echo \"${v2ray_listen}\" | grep -q 0.0.0.0:${proxy_port}" || eval "echo \"${v2ray_listen}\" | grep -q '\[::\]:${proxy_port}'" ; then
v2ray_share=true v2ray_share=true
return return
elif eval "echo \"${v2ray_listen}\" | grep -q :${proxy_port}" ; then elif eval "echo \"${v2ray_listen}\" | grep -q :${proxy_port}" ; then