Merge Lean's source

This commit is contained in:
CN_SZTL 2020-01-15 12:00:56 +08:00
commit 55e628b61d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -112,6 +112,11 @@ local function processData(szType, content)
hash = md5(luci.jsonc.stringify(content))
end
result.hashkey = hash
-- 如果节点内容为空,返回无效的节点信息
if content == '' then
result.server = ''
return result, hash
end
if szType == 'ssr' then
local dat = split(content, "/\\?")
local hostInfo = split(dat[1], ':')
@ -232,7 +237,7 @@ local execute = function()
node = servers
else
-- ssd 外的格式
node = split(base64Decode(raw, true), "\n")
node = split(base64Decode(raw, true):gsub(" ", "\n"), "\n")
end
for _, v in ipairs(node) do
if v then
@ -336,4 +341,4 @@ if subscribe_url and #subscribe_url > 0 then
luci.sys.call("/etc/init.d/" .. name .." stop > /dev/null 2>&1 &") -- 不加&的话日志会出现的更早
end
end)
end
end