From 3daa35cc198ad8991c7b761db6786696e474c5cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 18:56:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20Sync=202026-03-06=2018:56:41?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../luasrc/model/cbi/passwall/client/acl_config.lua | 6 ++++-- .../luasrc/model/cbi/passwall/client/global.lua | 6 ++++-- luci-app-passwall/luasrc/passwall/util_sing-box.lua | 4 ++++ luci-app-passwall/root/usr/share/passwall/app.sh | 7 ++++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua index 315533dbd..75a710631 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua @@ -406,8 +406,8 @@ end o = s:option(ListValue, "xray_dns_mode", translate("Request protocol")) o.default = "tcp" -o:value("udp", "UDP") o:value("tcp", "TCP") +o:value("udp", "UDP") o:value("tcp+doh", "TCP + DoH (" .. translate("A/AAAA type") .. ")") o:depends("dns_mode", "xray") o.cfgvalue = function(self, section) @@ -421,9 +421,10 @@ end o = s:option(ListValue, "singbox_dns_mode", translate("Request protocol")) o.default = "tcp" -o:value("udp", "UDP") o:value("tcp", "TCP") +o:value("udp", "UDP") o:value("doh", "DoH") +o:value("http3", "HTTP3(DoH3)") o:depends("dns_mode", "sing-box") o.cfgvalue = function(self, section) return m:get(section, "v2ray_dns_mode") @@ -488,6 +489,7 @@ o.validate = function(self, value, t) end o:depends({xray_dns_mode = "tcp+doh"}) o:depends({singbox_dns_mode = "doh"}) +o:depends({singbox_dns_mode = "http3"}) o = s:option(Value, "remote_dns_client_ip", translate("EDNS Client Subnet")) o.description = translate("Notify the DNS server when the DNS query is notified, the location of the client (cannot be a private IP address).") .. "
" .. diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index ce8184422..1451dca36 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -377,8 +377,8 @@ end o = s:taboption("DNS", ListValue, "xray_dns_mode", translate("Remote DNS") .. " " .. translate("Request protocol")) o.default = "tcp" -o:value("udp", "UDP") o:value("tcp", "TCP") +o:value("udp", "UDP") o:value("tcp+doh", "TCP + DoH (" .. translate("A/AAAA type") .. ")") o:depends("dns_mode", "xray") o:depends("smartdns_dns_mode", "xray") @@ -394,9 +394,10 @@ end o = s:taboption("DNS", ListValue, "singbox_dns_mode", translate("Remote DNS") .. " " .. translate("Request protocol")) o.default = "tcp" -o:value("udp", "UDP") o:value("tcp", "TCP") +o:value("udp", "UDP") o:value("doh", "DoH") +o:value("http3", "HTTP3(DoH3)") o:depends("dns_mode", "sing-box") o:depends("smartdns_dns_mode", "sing-box") o.cfgvalue = function(self, section) @@ -457,6 +458,7 @@ o:value("https://doh.libredns.gr/ads,116.202.176.26", "116.202.176.26 (LibreDNS- o.validate = doh_validate o:depends({xray_dns_mode = "tcp+doh"}) o:depends({singbox_dns_mode = "doh"}) +o:depends({singbox_dns_mode = "http3"}) o = s:taboption("DNS", Value, "remote_dns_client_ip", translate("EDNS Client Subnet")) o.description = translate("Notify the DNS server when the DNS query is notified, the location of the client (cannot be a private IP address).") .. "
" .. diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index c72c6b9fd..2c286a338 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -924,6 +924,7 @@ function gen_config(var) local remote_dns_doh_host = var["remote_dns_doh_host"] local remote_dns_doh_ip = var["remote_dns_doh_ip"] local remote_dns_doh_port = var["remote_dns_doh_port"] + local remote_dns_http3 = var["remote_dns_http3"] local remote_dns_client_ip = var["remote_dns_client_ip"] local remote_dns_query_strategy = var["remote_dns_query_strategy"] local remote_dns_fake = var["remote_dns_fake"] @@ -1666,6 +1667,9 @@ function gen_config(var) local _a = api.parseURL(remote_dns_doh_url) if _a then remote_server.type = "https" + if remote_dns_http3 then + remote_server.type = "h3" + end remote_server.server = _a.hostname if _a.port then remote_server.server_port = _a.port diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh index 9870727b2..f68fadfb4 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -172,13 +172,14 @@ run_singbox() { json_add_string "remote_dns_${_proto}_server" "${_dns_address}" json_add_string "remote_dns_${_proto}_port" "${_dns_port}" ;; - doh) + doh|http3) local _doh_url _doh_host _doh_port _doh_bootstrap parse_doh "$remote_dns_doh" _doh_url _doh_host _doh_port _doh_bootstrap [ -n "$_doh_bootstrap" ] && json_add_string "remote_dns_doh_ip" "${_doh_bootstrap}" json_add_string "remote_dns_doh_port" "${_doh_port}" json_add_string "remote_dns_doh_url" "${_doh_url}" json_add_string "remote_dns_doh_host" "${_doh_host}" + [ "$remote_dns_protocol" = "http3" ] && json_add_string "remote_dns_http3" "1" ;; esac [ -n "$remote_dns_client_ip" ] && json_add_string "remote_dns_client_ip" "${remote_dns_client_ip}" @@ -774,7 +775,7 @@ run_redir() { _args="${_args} remote_dns_${_proto}_server=${REMOTE_DNS}" resolve_dns_log="Sing-Box DNS(127.0.0.1#${resolve_dns_port}) -> ${_proto}://${REMOTE_DNS}" ;; - doh) + doh|http3) remote_dns_doh=$(config_t_get global remote_dns_doh "https://1.1.1.1/dns-query") _args="${_args} remote_dns_doh=${remote_dns_doh}" resolve_dns_log="Sing-Box DNS(127.0.0.1#${resolve_dns_port}) -> ${remote_dns_doh}" @@ -1326,7 +1327,7 @@ start_dns() { _args="${_args} remote_dns_${_proto}_server=${REMOTE_DNS}" echolog " - Sing-Box DNS(${TUN_DNS}) -> ${_proto}://${REMOTE_DNS}" ;; - doh) + doh|http3) remote_dns_doh=$(config_t_get global remote_dns_doh "https://1.1.1.1/dns-query") _args="${_args} remote_dns_doh=${remote_dns_doh}" echolog " - Sing-Box DNS(${TUN_DNS}) -> ${remote_dns_doh}"