update 2025-08-06 04:25:40

This commit is contained in:
kenzok8
2025-08-06 04:25:40 +08:00
parent 434c5fd6b5
commit c04b730aab
2 changed files with 15 additions and 4 deletions

View File

@@ -1580,6 +1580,9 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
queryParam[decodeURIComponent(params[0])] = decodeURIComponent(params[1] || ''); queryParam[decodeURIComponent(params[0])] = decodeURIComponent(params[1] || '');
} }
} }
if ((!queryParam.security || queryParam.security == "") && queryParam.sni && queryParam.sni != "") {
queryParam.security = "tls";
}
if (queryParam.security) { if (queryParam.security) {
if (queryParam.security == "tls") { if (queryParam.security == "tls") {
opt.set(dom_prefix + 'tls', true); opt.set(dom_prefix + 'tls', true);

View File

@@ -280,7 +280,7 @@ do
if node.balancing_node then if node.balancing_node then
for k, node in pairs(node.balancing_node) do for k, node in pairs(node.balancing_node) do
currentNodes[#currentNodes + 1] = { currentNodes[#currentNodes + 1] = {
log = false, log = true,
node = node, node = node,
currentNode = node and uci:get_all(appname, node) or nil, currentNode = node and uci:get_all(appname, node) or nil,
remarks = node, remarks = node,
@@ -328,7 +328,7 @@ do
if node.urltest_node then if node.urltest_node then
for k, node in pairs(node.urltest_node) do for k, node in pairs(node.urltest_node) do
currentNodes[#currentNodes + 1] = { currentNodes[#currentNodes + 1] = {
log = false, log = true,
node = node, node = node,
currentNode = node and uci:get_all(appname, node) or nil, currentNode = node and uci:get_all(appname, node) or nil,
remarks = node, remarks = node,
@@ -1452,9 +1452,12 @@ local function processData(szType, content, add_mode, add_from)
result.address = host_port result.address = host_port
end end
result.tls = "0" result.tls = "0"
if (not params.security or params.security == "") and params.sni and params.sni ~= "" then
params.security = "tls"
end
if params.security == "tls" or params.security == "reality" then if params.security == "tls" or params.security == "reality" then
result.tls = "1" result.tls = "1"
result.tls_serverName = (params.sni and params.sni ~= "") and params.sni or params.host result.tls_serverName = params.sni
result.alpn = params.alpn result.alpn = params.alpn
if params.fp and params.fp ~= "" then if params.fp and params.fp ~= "" then
result.utls = "1" result.utls = "1"
@@ -1566,7 +1569,9 @@ local function select_node(nodes, config, parentConfig)
if config.currentNode[".name"] then if config.currentNode[".name"] then
for index, node in pairs(nodes) do for index, node in pairs(nodes) do
if node[".name"] == config.currentNode[".name"] then if node[".name"] == config.currentNode[".name"] then
if config.log == nil or config.log == true then
log('更新【' .. config.remarks .. '】匹配节点:' .. node.remarks) log('更新【' .. config.remarks .. '】匹配节点:' .. node.remarks)
end
server = node[".name"] server = node[".name"]
break break
end end
@@ -1734,6 +1739,9 @@ local function update_node(manual)
for _, config in pairs(CONFIG) do for _, config in pairs(CONFIG) do
if config.currentNodes and #config.currentNodes > 0 then if config.currentNodes and #config.currentNodes > 0 then
if config.remarks and config.currentNodes[1].log ~= false then
log('----【' .. config.remarks .. '】----')
end
for kk, vv in pairs(config.currentNodes) do for kk, vv in pairs(config.currentNodes) do
select_node(nodes, vv, config) select_node(nodes, vv, config)
end end