mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-08-01 23:19:33 +08:00
🌈 Sync 2026-04-05 23:43:12
This commit is contained in:
parent
9a5495b4ce
commit
8eae22d30f
@ -1955,7 +1955,7 @@ function gen_config(var)
|
||||
}
|
||||
})
|
||||
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"))
|
||||
end
|
||||
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)
|
||||
if to_node then
|
||||
-- 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
|
||||
end
|
||||
end
|
||||
if to_node then
|
||||
local to_outbound
|
||||
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()
|
||||
table.insert(inbounds, {
|
||||
tag = tag,
|
||||
tag = in_tag,
|
||||
listen = "127.0.0.1",
|
||||
port = new_port,
|
||||
protocol = "dokodemo-door",
|
||||
@ -1086,11 +1086,11 @@ function gen_config(var)
|
||||
to_node.address = "127.0.0.1"
|
||||
to_node.port = new_port
|
||||
table.insert(rules, 1, {
|
||||
inboundTag = {tag},
|
||||
inboundTag = {in_tag},
|
||||
outboundTag = outbound.tag
|
||||
})
|
||||
to_outbound = gen_outbound(node[".name"], to_node, tag, {
|
||||
tag = tag,
|
||||
to_outbound = gen_outbound(node[".name"], to_node, to_node[".name"], {
|
||||
tag = to_node[".name"],
|
||||
run_socks_instance = not no_run
|
||||
})
|
||||
else
|
||||
@ -1734,14 +1734,10 @@ function gen_config(var)
|
||||
else
|
||||
table.insert(outbounds, blackhole_outbound)
|
||||
end
|
||||
|
||||
for index, value in ipairs(config.outbounds) do
|
||||
local s = value.settings
|
||||
if not value["_flag_proxy_tag"] and value["_id"] and s and not no_run and
|
||||
((s.vnext and s.vnext[1] and s.vnext[1].address and s.vnext[1].port) or
|
||||
(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
|
||||
local pt = value.protocol
|
||||
local exclude = { blackhole=1, dns=1, freedom=1, loopback=1 }
|
||||
if not value["_flag_proxy_tag"] and value["_id"] and pt and not exclude[pt] and not no_run then
|
||||
sys.call(string.format("echo '%s' >> %s", value["_id"], api.TMP_PATH .. "/direct_node_list"))
|
||||
end
|
||||
for k, v in pairs(config.outbounds[index]) do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user