This commit is contained in:
LEAN-ESX 2020-02-29 22:59:29 -08:00
commit dd78885e9d
2 changed files with 11 additions and 16 deletions

View File

@ -38,7 +38,7 @@ o.rmempty = false
o = s:taboption("basic", Button, "restart")
o.title = translate("Adbyby and Rule state")
o.inputtitle = translate("Restart Adbyby")
o.description = string.format("<strong>Last Update Checked</strong> %s<br /><strong>Lazy Rule</strong>%s <br /><strong>Video Rule</strong>%s", UD, DL, DV)
o.description = string.format("<strong>"..translate("Last Update Checked").."</strong> %s<br /><strong>"..translate("Lazy Rule").."</strong>%s <br /><strong>"..translate("Video Rule").."</strong>%s", UD, DL, DV)
o.inputstyle = "reload"
o.write = function()
SYS.call("rm -rf /tmp/adbyby.updated && /usr/share/adbyby/admem.sh > /tmp/adupdate.log 2>&1 &")

View File

@ -96,14 +96,8 @@ end
-- 处理数据
local function processData(szType, content)
local result = {
-- auth_enable = '0',
-- switch_enable = '1',
type = szType,
local_port = 1234,
-- timeout = 60, -- 不太确定 好像是死的
-- fast_open = 0,
-- kcp_enable = 0,
-- kcp_port = 0,
kcp_param = '--nocomp'
}
if szType == 'ssr' then
@ -306,10 +300,10 @@ local execute = function()
nodes = base64Decode(raw:sub(nEnd + 1, #raw))
nodes = jsonParse(nodes)
local extra = {
airport = nodes.airport,
port = nodes.port,
encryption = nodes.encryption,
password = nodes.password
airport = nodes.airport,
port = nodes.port,
encryption = nodes.encryption,
password = nodes.password
}
local servers = {}
-- SS里面包着 干脆直接这样
@ -346,8 +340,9 @@ local execute = function()
result.alias:find("QQ群") or
result.alias:find("官网") or
result.alias:find("防失联地址") or
not result.server
then
not result.server or
result.server:match("[^0-9a-zA-Z%-%.%s]") -- 中文做地址的 也没有人拿中文域名搞就算中文域也有Puny Code SB 机场
then
log('丢弃无效节点: ' .. result.type ..' 节点, ' .. result.alias)
else
log('成功解析: ' .. result.type ..' 节点, ' .. result.alias)
@ -384,11 +379,11 @@ local execute = function()
end
else
if not old.alias then
old.alias = old.server .. ':' .. old.server_port
end
old.alias = old.server .. ':' .. old.server_port
end
log('忽略手动添加的节点: ' .. old.alias)
end
end)
for k, v in ipairs(nodeResult) do
for kk, vv in ipairs(v) do