mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-07 15:20:14 +08:00
update 2025-08-06 04:25:40
This commit is contained in:
@@ -1580,6 +1580,9 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
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 == "tls") {
|
||||
opt.set(dom_prefix + 'tls', true);
|
||||
|
||||
@@ -280,7 +280,7 @@ do
|
||||
if node.balancing_node then
|
||||
for k, node in pairs(node.balancing_node) do
|
||||
currentNodes[#currentNodes + 1] = {
|
||||
log = false,
|
||||
log = true,
|
||||
node = node,
|
||||
currentNode = node and uci:get_all(appname, node) or nil,
|
||||
remarks = node,
|
||||
@@ -328,7 +328,7 @@ do
|
||||
if node.urltest_node then
|
||||
for k, node in pairs(node.urltest_node) do
|
||||
currentNodes[#currentNodes + 1] = {
|
||||
log = false,
|
||||
log = true,
|
||||
node = node,
|
||||
currentNode = node and uci:get_all(appname, node) or nil,
|
||||
remarks = node,
|
||||
@@ -1452,9 +1452,12 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.address = host_port
|
||||
end
|
||||
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
|
||||
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
|
||||
if params.fp and params.fp ~= "" then
|
||||
result.utls = "1"
|
||||
@@ -1566,7 +1569,9 @@ local function select_node(nodes, config, parentConfig)
|
||||
if config.currentNode[".name"] then
|
||||
for index, node in pairs(nodes) do
|
||||
if node[".name"] == config.currentNode[".name"] then
|
||||
if config.log == nil or config.log == true then
|
||||
log('更新【' .. config.remarks .. '】匹配节点:' .. node.remarks)
|
||||
end
|
||||
server = node[".name"]
|
||||
break
|
||||
end
|
||||
@@ -1734,6 +1739,9 @@ local function update_node(manual)
|
||||
|
||||
for _, config in pairs(CONFIG) do
|
||||
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
|
||||
select_node(nodes, vv, config)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user