diff --git a/customize.sh b/customize.sh index d3367f0..f0ddc9a 100644 --- a/customize.sh +++ b/customize.sh @@ -48,7 +48,6 @@ unzip -j -o "${download_v2ray_zip}" "geosite.dat" -d /data/v2ray >&2 unzip -j -o "${download_v2ray_zip}" "v2ray" -d $MODPATH/system/bin >&2 unzip -j -o "${download_v2ray_zip}" "v2ctl" -d $MODPATH/system/bin >&2 unzip -j -o "${ZIPFILE}" 'v2ray/scripts/*' -d $MODPATH/scripts >&2 -unzip -j -o "${ZIPFILE}" "v2ray/bin/$ARCH/dnscrypt-proxy" -d $MODPATH/system/bin >&2 unzip -j -o "${ZIPFILE}" 'service.sh' -d $MODPATH >&2 unzip -j -o "${ZIPFILE}" 'uninstall.sh' -d $MODPATH >&2 rm "${download_v2ray_zip}" diff --git a/v2ray/scripts/v2ray.service b/v2ray/scripts/v2ray.service index d9b9330..5d2fec7 100644 --- a/v2ray/scripts/v2ray.service +++ b/v2ray/scripts/v2ray.service @@ -50,7 +50,7 @@ wait_v2ray_listen() { wait_count=0 v2ray_pid=`cat ${pid_file}` find_netstat_path && \ - check_v2ray_cmd="netstat -tnlp | grep v2ray | grep -q LISTEN" || \ + check_v2ray_cmd="netstat -tnlp 2>/dev/null | grep v2ray | grep -q LISTEN" || \ check_v2ray_cmd="ls -lh /proc/${v2ray_pid}/fd | grep -q socket" while probe_v2ray_alive && ! eval "${check_v2ray_cmd}" && [ ${wait_count} -lt 100 ] ; do sleep 1 ; wait_count=$((${wait_count} + 1)) diff --git a/v2ray/scripts/v2ray.tproxy b/v2ray/scripts/v2ray.tproxy index bbd0c6d..8fb2b80 100644 --- a/v2ray/scripts/v2ray.tproxy +++ b/v2ray/scripts/v2ray.tproxy @@ -46,7 +46,7 @@ find_netstat_path() { probe_v2ray_listen() { find_netstat_path || return - v2ray_listen=`netstat -tnlp | grep v2ray | grep LISTEN` + v2ray_listen=`netstat -tnlp 2>/dev/null | 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}" || eval "echo \"${v2ray_listen}\" | grep -q '\[::\]:${proxy_port}'" ; then v2ray_share=true return