luci-app-passwall2: sync upstream

This commit is contained in:
actions 2024-01-08 03:00:11 +08:00
parent 5670c4719a
commit bed9994441
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall2
PKG_VERSION:=1.22-1
PKG_VERSION:=1.22-2
PKG_RELEASE:=
PKG_CONFIG_DEPENDS:= \

View File

@ -1260,10 +1260,6 @@ function gen_config(var)
remote_strategy = "ipv6_only"
end
if remote_dns_detour == "direct" then
default_outTag = "direct"
end
local remote_server = {
tag = "remote",
address_strategy = "prefer_ipv4",
@ -1272,6 +1268,10 @@ function gen_config(var)
detour = default_outTag,
}
if remote_dns_detour == "direct" then
remote_server.detour = "direct"
end
if remote_dns_udp_server then
local server_port = tonumber(remote_dns_udp_port) or 53
remote_server.address = "udp://" .. remote_dns_udp_server .. ":" .. server_port
@ -1374,7 +1374,7 @@ function gen_config(var)
if value.outboundTag ~= "block" and value.outboundTag ~= "direct" then
dns_rule.server = "remote"
dns_rule.rewrite_ttl = 30
if value.outboundTag ~= "default" and remote_server.address and remote_server.detour ~= "direct" then
if value.outboundTag ~= "default" and remote_server.address and remote_dns_detour ~= "direct" then
local remote_dns_server = api.clone(remote_server)
remote_dns_server.tag = value.outboundTag
remote_dns_server.detour = value.outboundTag