This commit is contained in:
Tianhe Y 2023-04-01 12:52:05 +08:00 committed by sbwml
parent c9ee3e26fe
commit 226736e6bf
2 changed files with 35 additions and 0 deletions

View File

@ -141,6 +141,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
o.write = get_write(v.id, "main_node")
local dialerProxy = s:taboption("Main", Flag, vid .. "-dialerProxy", translate("dialerProxy"))
dialerProxy.default = "0"
if v.type == "Xray" then
dialerProxy:depends("tcp_node", v.id)
else --主设置界面没有type判断只能判断本分流节点类型是Xray就添加对本分流节点的依赖但不是的话就没有依赖会全部显示所以添加一个不存在的依赖以达到隐藏的目的
@ -148,6 +149,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
end
dialerProxy.cfgvalue = get_cfgvalue(v.id, "dialerProxy")
dialerProxy.write = get_write(v.id, "dialerProxy")
dialerProxy.rmempty = false
uci:foreach(appname, "shunt_rules", function(e)
local id = e[".name"]

View File

@ -809,6 +809,7 @@ function gen_config(var)
table.insert(protocols, w)
end)
end
--[[
local _domain = nil
if e.domain_list then
_domain = {}
@ -831,6 +832,38 @@ function gen_config(var)
ip = _ip,
protocol = protocols
})
--]]
if e.domain_list then
local _domain = {}
string.gsub(e.domain_list, '[^' .. "\r\n" .. ']+', function(w)
table.insert(_domain, w)
end)
table.insert(rules, {
type = "field",
outboundTag = outboundTag,
domain = _domain,
protocol = protocols
})
end
if e.ip_list then
local _ip = {}
string.gsub(e.ip_list, '[^' .. "\r\n" .. ']+', function(w)
table.insert(_ip, w)
end)
table.insert(rules, {
type = "field",
outboundTag = outboundTag,
ip = _ip,
protocol = protocols
})
end
if not e.domain_list and not e.ip_list and protocols then
table.insert(rules, {
type = "field",
outboundTag = outboundTag,
protocol = protocols
})
end
end
end)