update 2025-05-02 12:25:42

This commit is contained in:
kenzok8 2025-05-02 12:25:42 +08:00
parent f81104cd6d
commit c3847f6ca3
1 changed files with 17 additions and 13 deletions

View File

@ -549,8 +549,8 @@ local function processData(szType, content, add_mode, add_from)
info.type = "none" info.type = "none"
end end
result.tcp_guise = info.type result.tcp_guise = info.type
result.tcp_guise_http_host = info.host result.tcp_guise_http_host = (info.host and info.host ~= "") and { info.host } or nil
result.tcp_guise_http_path = info.path result.tcp_guise_http_path = (info.path and info.path ~= "") and { info.path } or nil
end end
if info.net == 'kcp' or info.net == 'mkcp' then if info.net == 'kcp' or info.net == 'mkcp' then
info.net = "mkcp" info.net = "mkcp"
@ -707,7 +707,7 @@ local function processData(szType, content, add_mode, add_from)
if obfs == "http" then if obfs == "http" then
result.transport = "raw" result.transport = "raw"
result.tcp_guise = "http" result.tcp_guise = "http"
result.tcp_guise_http_host = obfs_host result.tcp_guise_http_host = (obfs_host and obfs_host ~= "") and { obfs_host } or nil
elseif obfs == "tls" then elseif obfs == "tls" then
result.tls = "1" result.tls = "1"
result.tls_serverName = obfs_host result.tls_serverName = obfs_host
@ -783,8 +783,8 @@ local function processData(szType, content, add_mode, add_from)
end end
if params.type == 'raw' or params.type == 'tcp' then if params.type == 'raw' or params.type == 'tcp' then
result.tcp_guise = params.headerType or "none" result.tcp_guise = params.headerType or "none"
result.tcp_guise_http_host = params.host result.tcp_guise_http_host = (params.host and params.host ~= "") and { params.host } or nil
result.tcp_guise_http_path = params.path result.tcp_guise_http_path = (params.path and params.path ~= "") and { params.path } or nil
end end
if params.type == 'kcp' or params.type == 'mkcp' then if params.type == 'kcp' or params.type == 'mkcp' then
result.transport = "mkcp" result.transport = "mkcp"
@ -944,8 +944,8 @@ local function processData(szType, content, add_mode, add_from)
end end
if params.type == 'raw' or params.type == 'tcp' then if params.type == 'raw' or params.type == 'tcp' then
result.tcp_guise = params.headerType or "none" result.tcp_guise = params.headerType or "none"
result.tcp_guise_http_host = params.host result.tcp_guise_http_host = (params.host and params.host ~= "") and { params.host } or nil
result.tcp_guise_http_path = params.path result.tcp_guise_http_path = (params.path and params.path ~= "") and { params.path } or nil
end end
if params.type == 'kcp' or params.type == 'mkcp' then if params.type == 'kcp' or params.type == 'mkcp' then
result.transport = "mkcp" result.transport = "mkcp"
@ -1091,8 +1091,8 @@ local function processData(szType, content, add_mode, add_from)
end end
if params.type == 'raw' or params.type == 'tcp' then if params.type == 'raw' or params.type == 'tcp' then
result.tcp_guise = params.headerType or "none" result.tcp_guise = params.headerType or "none"
result.tcp_guise_http_host = params.host result.tcp_guise_http_host = (params.host and params.host ~= "") and { params.host } or nil
result.tcp_guise_http_path = params.path result.tcp_guise_http_path = (params.path and params.path ~= "") and { params.path } or nil
end end
if params.type == 'kcp' or params.type == 'mkcp' then if params.type == 'kcp' or params.type == 'mkcp' then
result.transport = "mkcp" result.transport = "mkcp"
@ -1621,6 +1621,9 @@ local function update_node(manual)
for _, vv in ipairs(list) do for _, vv in ipairs(list) do
local cfgid = uci:section(appname, "nodes", api.gen_short_uuid()) local cfgid = uci:section(appname, "nodes", api.gen_short_uuid())
for kkk, vvv in pairs(vv) do for kkk, vvv in pairs(vv) do
if type(vvv) == "table" and next(vvv) ~= nil then
uci:set_list(appname, cfgid, kkk, vvv)
else
uci:set(appname, cfgid, kkk, vvv) uci:set(appname, cfgid, kkk, vvv)
-- sing-box 域名解析策略 -- sing-box 域名解析策略
if kkk == "type" and vvv == "sing-box" then if kkk == "type" and vvv == "sing-box" then
@ -1629,6 +1632,7 @@ local function update_node(manual)
end end
end end
end end
end
-- 更新机场信息 -- 更新机场信息
for cfgid, info in pairs(subscribe_info) do for cfgid, info in pairs(subscribe_info) do
for key, value in pairs(info) do for key, value in pairs(info) do