mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
luci-app-ssr-plus: revert /etc/ssr_ip
This commit is contained in:
parent
53693fbedb
commit
83b38d91cb
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=174
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
@ -58,6 +58,7 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/ssr_ip
|
||||
/etc/china_ssr.txt
|
||||
/etc/config/shadowsocksr
|
||||
/etc/config/white.list
|
||||
|
@ -91,7 +91,7 @@ gen_config_file() {
|
||||
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
|
||||
hostip=$(cat /tmp/ssr_ip)
|
||||
hostip=$(cat /etc/ssr_ip)
|
||||
fi
|
||||
fi
|
||||
[ "$2" == "0" -a "$kcp_flag" == "1" ] && hostip="127.0.0.1"
|
||||
@ -179,9 +179,9 @@ start_rules() {
|
||||
else
|
||||
server=$(ping $server -W 1 -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1)
|
||||
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 >/tmp/ssr_ip
|
||||
echo $server >/etc/ssr_ip
|
||||
else
|
||||
server=$(cat /tmp/ssr_ip)
|
||||
server=$(cat /etc/ssr_ip)
|
||||
fi
|
||||
fi
|
||||
kcp_server=$server
|
||||
|
@ -21,9 +21,6 @@ touch /etc/config/netflixip.list
|
||||
touch /etc/dnsmasq.ssr/ad.conf
|
||||
touch /etc/dnsmasq.ssr/gfw_list.conf
|
||||
|
||||
/etc/init.d/shadowsocksr enable
|
||||
/etc/init.d/shadowsocksr stop
|
||||
|
||||
rm -rf /tmp/luci-modulecache/*
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user