mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-29 05:55:13 +08:00
update 2026-05-19 15:41:39
This commit is contained in:
1 parent
63075a3304
commit
ffa897ed53
4 files changed
+21
-8
No files matched your search
@@ -824,17 +824,21 @@ if not load_shunt_options then
|
||||
if not (load_iface_options or load_urltest_options) then
|
||||
-- Special node cannot be use pre-proxy.
|
||||
o:value("1", translate("Preproxy Node"))
|
||||
o:value("3", translate("Outbound Interface"))
|
||||
end
|
||||
o:value("2", translate("Landing Node"))
|
||||
o:depends({ [_n("hysteria2_realms")] = false })
|
||||
|
||||
o1 = s:option(ListValue, _n("preproxy_node"), translate("Preproxy Node"), translate("Only support a layer of proxy."))
|
||||
o1:depends({ [_n("chain_proxy")] = "1" })
|
||||
o1:depends({ [_n("chain_proxy")] = "1", [_n("hysteria2_realms")] = false })
|
||||
o1.template = appname .. "/cbi/nodes_listvalue"
|
||||
o1.group = {}
|
||||
|
||||
o3 = s:option(Value, _n("outbound_iface"), translate("Outbound Interface"))
|
||||
o3.default = "eth1"
|
||||
o3:depends({ [_n("chain_proxy")] = "3" })
|
||||
|
||||
o2 = s:option(ListValue, _n("to_node"), translate("Landing Node"), translate("Only support a layer of proxy."))
|
||||
o2:depends({ [_n("chain_proxy")] = "2" })
|
||||
o2:depends({ [_n("chain_proxy")] = "2", [_n("hysteria2_realms")] = false })
|
||||
o2.template = appname .. "/cbi/nodes_listvalue"
|
||||
o2.group = {}
|
||||
|
||||
|
||||
@@ -1438,6 +1438,10 @@ function gen_config(var)
|
||||
end
|
||||
end
|
||||
end
|
||||
if node.chain_proxy == "3" and node.outbound_iface then
|
||||
outbound.detour = nil
|
||||
outbound.bind_interface = node.outbound_iface
|
||||
end
|
||||
return default_outTag, last_insert_outbound
|
||||
end
|
||||
|
||||
@@ -2006,6 +2010,10 @@ function gen_config(var)
|
||||
}
|
||||
end
|
||||
|
||||
route.default_domain_resolver = {
|
||||
server = "direct"
|
||||
}
|
||||
|
||||
if not dns.rules then dns.rules = {} end
|
||||
|
||||
for i, v in pairs(GLOBAL.DNS_SERVER) do
|
||||
@@ -2102,16 +2110,12 @@ function gen_config(var)
|
||||
type = "direct",
|
||||
tag = "direct",
|
||||
routing_mark = 255,
|
||||
domain_resolver = {
|
||||
server = "direct",
|
||||
strategy = "prefer_ipv6"
|
||||
}
|
||||
})
|
||||
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 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
|
||||
if not value.detour and value.server then
|
||||
if not value.detour and not value.bind_interface and value.server then
|
||||
value.detour = "direct"
|
||||
end
|
||||
if (value.server and not api.datatypes.hostname(value.server)) and not value.realm then
|
||||
|
||||
@@ -874,6 +874,8 @@ table td, .table .td {
|
||||
p = "URLTest";
|
||||
} else if (protocol == "_shunt") {
|
||||
p = "<%:Shunt%>";
|
||||
} else if (protocol == "_iface") {
|
||||
p = "<%:Interface%>";
|
||||
} else if (protocol == "vmess") {
|
||||
p = "VMess";
|
||||
} else if (protocol == "vless") {
|
||||
|
||||
@@ -1924,6 +1924,9 @@ msgstr "仅支持 Xray 或 Sing-box 类型节点。"
|
||||
msgid "Chain Proxy"
|
||||
msgstr "链式代理"
|
||||
|
||||
msgid "Outbound Interface"
|
||||
msgstr "出站接口"
|
||||
|
||||
msgid "Landing Node"
|
||||
msgstr "落地节点"
|
||||
|
||||
|
||||
Reference in new issue
Block a user