parent
aae65ba114
commit
9f37de0b08
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-passwall2
|
PKG_NAME:=luci-app-passwall2
|
||||||
PKG_VERSION:=24.12.19
|
PKG_VERSION:=24.12.19
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
||||||
|
@ -94,6 +94,11 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
|||||||
m:set(shunt_node_id, option, value)
|
m:set(shunt_node_id, option, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local function get_remove(shunt_node_id, option)
|
||||||
|
return function(self, section)
|
||||||
|
m:del(shunt_node_id, option)
|
||||||
|
end
|
||||||
|
end
|
||||||
if #normal_list > 0 then
|
if #normal_list > 0 then
|
||||||
for k, v in pairs(shunt_list) do
|
for k, v in pairs(shunt_list) do
|
||||||
local vid = v.id
|
local vid = v.id
|
||||||
@ -148,8 +153,8 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
|||||||
o = s:taboption("Main", ListValue, node_option, string.format('* <a href="%s" target="_blank">%s</a>', api.url("shunt_rules", id), e.remarks))
|
o = s:taboption("Main", ListValue, node_option, string.format('* <a href="%s" target="_blank">%s</a>', api.url("shunt_rules", id), e.remarks))
|
||||||
o.cfgvalue = get_cfgvalue(v.id, id)
|
o.cfgvalue = get_cfgvalue(v.id, id)
|
||||||
o.write = get_write(v.id, id)
|
o.write = get_write(v.id, id)
|
||||||
|
o.remove = get_remove(v.id, id)
|
||||||
o:depends("node", v.id)
|
o:depends("node", v.id)
|
||||||
o.default = ""
|
|
||||||
o:value("", translate("Close"))
|
o:value("", translate("Close"))
|
||||||
o:value("_default", translate("Default"))
|
o:value("_default", translate("Default"))
|
||||||
o:value("_direct", translate("Direct Connection"))
|
o:value("_direct", translate("Direct Connection"))
|
||||||
@ -158,7 +163,7 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
|||||||
local pt = s:taboption("Main", ListValue, vid .. "-".. id .. "_proxy_tag", string.format('* <a style="color:red">%s</a>', e.remarks .. " " .. translate("Preproxy")))
|
local pt = s:taboption("Main", ListValue, vid .. "-".. id .. "_proxy_tag", string.format('* <a style="color:red">%s</a>', e.remarks .. " " .. translate("Preproxy")))
|
||||||
pt.cfgvalue = get_cfgvalue(v.id, id .. "_proxy_tag")
|
pt.cfgvalue = get_cfgvalue(v.id, id .. "_proxy_tag")
|
||||||
pt.write = get_write(v.id, id .. "_proxy_tag")
|
pt.write = get_write(v.id, id .. "_proxy_tag")
|
||||||
pt.default = ""
|
pt.remove = get_remove(v.id, id .. "_proxy_tag")
|
||||||
pt:value("", translate("Close"))
|
pt:value("", translate("Close"))
|
||||||
pt:value("main", translate("Preproxy Node"))
|
pt:value("main", translate("Preproxy Node"))
|
||||||
for k1, v1 in pairs(socks_list) do
|
for k1, v1 in pairs(socks_list) do
|
||||||
@ -181,6 +186,7 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
|||||||
o = s:taboption("Main", ListValue, vid .. "-" .. id, string.format('* <a style="color:red">%s</a>', translate("Default")))
|
o = s:taboption("Main", ListValue, vid .. "-" .. id, string.format('* <a style="color:red">%s</a>', translate("Default")))
|
||||||
o.cfgvalue = get_cfgvalue(v.id, id)
|
o.cfgvalue = get_cfgvalue(v.id, id)
|
||||||
o.write = get_write(v.id, id)
|
o.write = get_write(v.id, id)
|
||||||
|
o.remove = get_remove(v.id, id)
|
||||||
o:depends("node", v.id)
|
o:depends("node", v.id)
|
||||||
o.default = "_direct"
|
o.default = "_direct"
|
||||||
o:value("_direct", translate("Direct Connection"))
|
o:value("_direct", translate("Direct Connection"))
|
||||||
@ -202,6 +208,7 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
|||||||
o = s:taboption("Main", ListValue, vid .. "-" .. id, string.format('* <a style="color:red">%s</a>', translate("Default Preproxy")), translate("When using, localhost will connect this node first and then use this node to connect the default node."))
|
o = s:taboption("Main", ListValue, vid .. "-" .. id, string.format('* <a style="color:red">%s</a>', translate("Default Preproxy")), translate("When using, localhost will connect this node first and then use this node to connect the default node."))
|
||||||
o.cfgvalue = get_cfgvalue(v.id, id)
|
o.cfgvalue = get_cfgvalue(v.id, id)
|
||||||
o.write = get_write(v.id, id)
|
o.write = get_write(v.id, id)
|
||||||
|
o.remove = get_remove(v.id, id)
|
||||||
o:value("", translate("Close"))
|
o:value("", translate("Close"))
|
||||||
o:value("main", translate("Preproxy Node"))
|
o:value("main", translate("Preproxy Node"))
|
||||||
for k1, v1 in pairs(normal_list) do
|
for k1, v1 in pairs(normal_list) do
|
||||||
|
@ -950,7 +950,7 @@ function gen_config(var)
|
|||||||
rule_outboundTag = "block"
|
rule_outboundTag = "block"
|
||||||
elseif _node_id == "_default" and rule_name ~= "default" then
|
elseif _node_id == "_default" and rule_name ~= "default" then
|
||||||
rule_outboundTag = "default"
|
rule_outboundTag = "default"
|
||||||
elseif _node_id:find("Socks_") then
|
elseif _node_id and _node_id:find("Socks_") then
|
||||||
local socks_id = _node_id:sub(1 + #"Socks_")
|
local socks_id = _node_id:sub(1 + #"Socks_")
|
||||||
local socks_node = uci:get_all(appname, socks_id) or nil
|
local socks_node = uci:get_all(appname, socks_id) or nil
|
||||||
if socks_node then
|
if socks_node then
|
||||||
|
@ -848,7 +848,7 @@ function gen_config(var)
|
|||||||
return "blackhole", nil
|
return "blackhole", nil
|
||||||
elseif _node_id == "_default" then
|
elseif _node_id == "_default" then
|
||||||
return "default", nil
|
return "default", nil
|
||||||
elseif _node_id:find("Socks_") then
|
elseif _node_id and _node_id:find("Socks_") then
|
||||||
local socks_id = _node_id:sub(1 + #"Socks_")
|
local socks_id = _node_id:sub(1 + #"Socks_")
|
||||||
local socks_node = uci:get_all(appname, socks_id) or nil
|
local socks_node = uci:get_all(appname, socks_id) or nil
|
||||||
local socks_tag
|
local socks_tag
|
||||||
|
Loading…
Reference in New Issue
Block a user