diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index 03c924e917..26d4c068b9 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -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 \ No newline at end of file +end