🌈 Sync 2026-04-05 23:43:12

This commit is contained in:
github-actions[bot] committed 2026-04-05 23:43:12 +08:00
1 parent 98d388610f
commit 99882e63e3
2 files changed
+10 -14

No files matched your search

@@ -1955,7 +1955,7 @@ function gen_config(var)
} }
}) })
for index, value in ipairs(config.outbounds) do for index, value in ipairs(config.outbounds) do
if not value["_flag_proxy_tag"] and not value.detour and value["_id"] and value.server and value.server_port and not no_run then if not value["_flag_proxy_tag"] and not value.detour and value["_id"] and value.server and (value.server_port or value.server_ports) and not no_run then
sys.call(string.format("echo '%s' >> %s", value["_id"], api.TMP_PATH .. "/direct_node_list")) sys.call(string.format("echo '%s' >> %s", value["_id"], api.TMP_PATH .. "/direct_node_list"))
end end
for k, v in pairs(config.outbounds[index]) do for k, v in pairs(config.outbounds[index]) do
@@ -1064,17 +1064,17 @@ function gen_config(var)
local to_node = get_node_by_id(node.to_node) local to_node = get_node_by_id(node.to_node)
if to_node then if to_node then
-- Landing Node not support use special node. -- Landing Node not support use special node.
if to_node.protocol:find("^_") then if to_node.protocol and to_node.protocol:find("^_") then
to_node = nil to_node = nil
end end
end end
if to_node then if to_node then
local to_outbound local to_outbound
if to_node.type ~= "Xray" then if to_node.type ~= "Xray" then
local tag = to_node[".name"] local in_tag = "inbound_" .. to_node[".name"] .. "_" .. tostring(outbound.tag)
local new_port = api.get_new_port() local new_port = api.get_new_port()
table.insert(inbounds, { table.insert(inbounds, {
tag = tag, tag = in_tag,
listen = "127.0.0.1", listen = "127.0.0.1",
port = new_port, port = new_port,
protocol = "dokodemo-door", protocol = "dokodemo-door",
@@ -1086,11 +1086,11 @@ function gen_config(var)
to_node.address = "127.0.0.1" to_node.address = "127.0.0.1"
to_node.port = new_port to_node.port = new_port
table.insert(rules, 1, { table.insert(rules, 1, {
inboundTag = {tag}, inboundTag = {in_tag},
outboundTag = outbound.tag outboundTag = outbound.tag
}) })
to_outbound = gen_outbound(node[".name"], to_node, tag, { to_outbound = gen_outbound(node[".name"], to_node, to_node[".name"], {
tag = tag, tag = to_node[".name"],
run_socks_instance = not no_run run_socks_instance = not no_run
}) })
else else
@@ -1734,14 +1734,10 @@ function gen_config(var)
else else
table.insert(outbounds, blackhole_outbound) table.insert(outbounds, blackhole_outbound)
end end
for index, value in ipairs(config.outbounds) do for index, value in ipairs(config.outbounds) do
local s = value.settings local pt = value.protocol
if not value["_flag_proxy_tag"] and value["_id"] and s and not no_run and local exclude = { blackhole=1, dns=1, freedom=1, loopback=1 }
((s.vnext and s.vnext[1] and s.vnext[1].address and s.vnext[1].port) or if not value["_flag_proxy_tag"] and value["_id"] and pt and not exclude[pt] and not no_run then
(s.servers and s.servers[1] and s.servers[1].address and s.servers[1].port) or
(s.peers and s.peers[1] and s.peers[1].endpoint) or
(s.address and s.port)) then
sys.call(string.format("echo '%s' >> %s", value["_id"], api.TMP_PATH .. "/direct_node_list")) sys.call(string.format("echo '%s' >> %s", value["_id"], api.TMP_PATH .. "/direct_node_list"))
end end
for k, v in pairs(config.outbounds[index]) do for k, v in pairs(config.outbounds[index]) do