luci-app-ssr-plus: speedup start-delay when server-node disable ping
This commit is contained in:
parent
c0d39bb8e1
commit
5e2b2fe8e9
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=113
|
||||
PKG_RELEASE:=115
|
||||
|
||||
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \
|
||||
|
@ -67,7 +67,7 @@ gen_config_file() {
|
||||
elif [ "$host" != "${host#*:[0-9a-fA-F]}" ] ;then
|
||||
hostip=${host}
|
||||
else
|
||||
hostip=`ping ${host} -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1`
|
||||
hostip=`nslookup ${host} | grep 'Address 1' | sed 's/Address 1: //g'`
|
||||
if echo $hostip|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then
|
||||
hostip=${hostip}
|
||||
else
|
||||
@ -143,7 +143,7 @@ start_rules() {
|
||||
elif [ "$server" != "${server#*:[0-9a-fA-F]}" ] ;then
|
||||
server=${server}
|
||||
else
|
||||
server=`ping ${server} -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1`
|
||||
server=`nslookup ${server} | grep 'Address 1' | sed 's/Address 1: //g'`
|
||||
if echo $server|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then
|
||||
echo $server >/etc/ssr_ip
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user