luci-app-passwall2: sync upstream
This commit is contained in:
parent
1b268f5951
commit
0f321e7a27
@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-passwall2
|
PKG_NAME:=luci-app-passwall2
|
||||||
PKG_VERSION:=1.26-1
|
PKG_VERSION:=1.26-2
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
@ -237,8 +237,7 @@ o = s:option(Value, "remote_dns_client_ip", translate("Remote DNS EDNS Client Su
|
|||||||
o.description = translate("Notify the DNS server when the DNS query is notified, the location of the client (cannot be a private IP address).") .. "<br />" ..
|
o.description = translate("Notify the DNS server when the DNS query is notified, the location of the client (cannot be a private IP address).") .. "<br />" ..
|
||||||
translate("This feature requires the DNS server to support the Edns Client Subnet (RFC7871).")
|
translate("This feature requires the DNS server to support the Edns Client Subnet (RFC7871).")
|
||||||
o.datatype = "ipaddr"
|
o.datatype = "ipaddr"
|
||||||
o:depends("remote_dns_protocol", "tcp")
|
o:depends({ __hide = true })
|
||||||
o:depends("remote_dns_protocol", "doh")
|
|
||||||
|
|
||||||
o = s:option(ListValue, "remote_dns_detour", translate("Remote DNS Outbound"))
|
o = s:option(ListValue, "remote_dns_detour", translate("Remote DNS Outbound"))
|
||||||
o.default = "remote"
|
o.default = "remote"
|
||||||
@ -264,11 +263,26 @@ o:depends("remote_dns_protocol", "tcp")
|
|||||||
o:depends("remote_dns_protocol", "doh")
|
o:depends("remote_dns_protocol", "doh")
|
||||||
o:depends("remote_dns_protocol", "udp")
|
o:depends("remote_dns_protocol", "udp")
|
||||||
|
|
||||||
hosts = s:option(TextValue, "dns_hosts", translate("Domain Override"))
|
o = s:option(TextValue, "dns_hosts", translate("Domain Override"))
|
||||||
hosts.rows = 5
|
o.rows = 5
|
||||||
hosts.wrap = "off"
|
o.wrap = "off"
|
||||||
hosts:depends("remote_dns_protocol", "tcp")
|
o:depends({ __hide = true })
|
||||||
hosts:depends("remote_dns_protocol", "doh")
|
o.remove = function(self, section)
|
||||||
hosts:depends("remote_dns_protocol", "udp")
|
local node_value = node:formvalue(arg[1])
|
||||||
|
if node_value ~= "nil" then
|
||||||
|
local node_t = m:get(node_value) or {}
|
||||||
|
if node_t.type == "Xray" then
|
||||||
|
AbstractValue.remove(self, section)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for k, v in pairs(nodes_table) do
|
||||||
|
if v.type == "Xray" then
|
||||||
|
s.fields["remote_dns_client_ip"]:depends({ node = v.id, remote_dns_protocol = "tcp" })
|
||||||
|
s.fields["remote_dns_client_ip"]:depends({ node = v.id, remote_dns_protocol = "doh" })
|
||||||
|
s.fields["dns_hosts"]:depends({ node = v.id })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
@ -1201,7 +1201,7 @@ function gen_config(var)
|
|||||||
if node.iface then
|
if node.iface then
|
||||||
outbound = {
|
outbound = {
|
||||||
type = "direct",
|
type = "direct",
|
||||||
tag = "outbound",
|
tag = node_id,
|
||||||
bind_interface = node.iface,
|
bind_interface = node.iface,
|
||||||
routing_mark = 255,
|
routing_mark = 255,
|
||||||
}
|
}
|
||||||
@ -1236,9 +1236,8 @@ function gen_config(var)
|
|||||||
if outbound then
|
if outbound then
|
||||||
default_outTag = outbound.tag
|
default_outTag = outbound.tag
|
||||||
table.insert(outbounds, outbound)
|
table.insert(outbounds, outbound)
|
||||||
|
route.final = default_outTag
|
||||||
end
|
end
|
||||||
|
|
||||||
route.final = node_id
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ load_acl() {
|
|||||||
|
|
||||||
[ "$tcp_no_redir_ports" != "disable" ] && {
|
[ "$tcp_no_redir_ports" != "disable" ] && {
|
||||||
nft "add rule inet fw4 $nft_prerouting_chain ${_ipt_source} ip protocol tcp $(factor $tcp_no_redir_ports "tcp dport") counter return comment \"$remarks\""
|
nft "add rule inet fw4 $nft_prerouting_chain ${_ipt_source} ip protocol tcp $(factor $tcp_no_redir_ports "tcp dport") counter return comment \"$remarks\""
|
||||||
nft "add rule inet fw4 PSW2_MANGLE_V6 comment ${_ipt_source} meta l4proto tcp $(factor $tcp_no_redir_ports "tcp dport") counter return comment \"$remarks\""
|
nft "add rule inet fw4 PSW2_MANGLE_V6 ${_ipt_source} meta l4proto tcp $(factor $tcp_no_redir_ports "tcp dport") counter return comment \"$remarks\""
|
||||||
msg2="${msg2}[$?]除${tcp_no_redir_ports}外的"
|
msg2="${msg2}[$?]除${tcp_no_redir_ports}外的"
|
||||||
}
|
}
|
||||||
msg2="${msg2}所有端口"
|
msg2="${msg2}所有端口"
|
||||||
|
Loading…
Reference in New Issue
Block a user