Merge Lean's source

This commit is contained in:
CN_SZTL 2020-02-27 17:41:02 +08:00
parent 3aa63f524d
commit 4680c89c42
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 10 additions and 5 deletions

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=151
PKG_RELEASE:=2
PKG_VERSION:=153
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -64,7 +64,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=$(ping $host -W 1 -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1)
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
@ -148,7 +148,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=$(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 >/etc/ssr_ip
else

View File

@ -317,12 +317,17 @@ local execute = function()
end
end
log('成功解析节点数量: ' ..#nodes)
else
log(url .. ': 获取内容为空')
end
end
end
-- diff
do
assert(next(nodeResult), "node result is empty")
if next(nodeResult) == nil then
log("更新失败,没有可用的节点信息")
return
end
local add, del = 0, 0
ucic:foreach(name, uciType, function(old)
if old.grouphashkey or old.hashkey then -- 没有 hash 的不参与删除