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 dcd414b01..5ca99e2df 100644
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
@@ -384,16 +384,21 @@ o.validate = function(self, value, t)
return value
end
-o = s:taboption("DNS", ListValue, "chinadns_ng_default_tag", translate("ChinaDNS-NG Domain Default Tag"))
+o = s:taboption("DNS", ListValue, "chinadns_ng_default_tag", translate("Default DNS"))
o.default = "none"
-o:value("none", translate("Default"))
o:value("gfw", translate("Remote DNS"))
o:value("chn", translate("Direct DNS"))
-o.description = "
"
+o:value("none", translate("Smart, Do not accept no-ip reply from Direct DNS"))
+o:value("none_noip", translate("Smart, Accept no-ip reply from Direct DNS"))
+local desc = ""
.. "- " .. translate("When not matching any domain name list:") .. "
"
- .. "- " .. translate("Default: Forward to both direct and remote DNS, if the direct DNS resolution result is a mainland China ip, then use the direct result, otherwise use the remote result.") .. "
"
.. "- " .. translate("Remote DNS: Can avoid more DNS leaks, but some domestic domain names maybe to proxy!") .. "
"
.. "- " .. translate("Direct DNS: Internet experience may be better, but DNS will be leaked!") .. "
"
+o.description = desc
+ .. "- " .. translate("Smart: Forward to both direct and remote DNS, if the direct DNS resolution result is a mainland China IP, then use the direct result, otherwise use the remote result.") .. "
+ .. "- " .. translate("In smart mode, no-ip reply from Direct DNS:") .. "
"
+ .. "- " .. translate("Do not accept: Wait and use Remote DNS Reply.") .. "
"
+ .. "- " .. translate("Accept: Trust the Reply, using this option can improve DNS resolution speeds for some mainland IPv4-only sites.") .. "
"
.. "
"
o:depends({dns_shunt = "chinadns-ng", tcp_proxy_mode = "proxy", chn_list = "direct"})
@@ -401,11 +406,7 @@ o = s:taboption("DNS", ListValue, "use_default_dns", translate("Default DNS"))
o.default = "direct"
o:value("remote", translate("Remote DNS"))
o:value("direct", translate("Direct DNS"))
-o.description = ""
- .. "- " .. translate("When not matching any domain name list:") .. "
"
- .. "- " .. translate("Remote DNS: Can avoid more DNS leaks, but some domestic domain names maybe to proxy!") .. "
"
- .. "- " .. translate("Direct DNS: Internet experience may be better, but DNS will be leaked!") .. "
"
- .. "
"
+o.description = desc .. "
"
o:depends({dns_shunt = "dnsmasq", tcp_proxy_mode = "proxy", chn_list = "direct"})
o = s:taboption("DNS", Flag, "dns_redirect", "DNS " .. translate("Redirect"), translate("Force Router DNS server to all local devices."))
diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po
index f3d5894c4..8eafc696e 100644
--- a/luci-app-passwall/po/zh-cn/passwall.po
+++ b/luci-app-passwall/po/zh-cn/passwall.po
@@ -172,11 +172,23 @@ msgstr "远程DNS:可以避免更多的DNS泄露,但会导致规则列表外
msgid "Direct DNS: Internet experience may be better, but DNS will be leaked!"
msgstr "直连DNS:上网体验可能会更佳,但是会泄露DNS!"
-msgid "ChinaDNS-NG Domain Default Tag"
-msgstr "ChinaDNS-NG 域名默认标签"
+msgid "Smart, Do not accept no-ip reply from Direct DNS"
+msgstr "智能,不接受直连 DNS 空响应"
-msgid "Default: Forward to both direct and remote DNS, if the direct DNS resolution result is a mainland China ip, then use the direct result, otherwise use the remote result."
-msgstr "默认:同时转发给直连和远程DNS,如果直连DNS解析结果是大陆ip,则使用直连结果,否则使用远程结果。"
+msgid "Smart, Accept no-ip reply from Direct DNS"
+msgstr "智能,接受直连 DNS 空响应"
+
+msgid "Smart: Forward to both direct and remote DNS, if the direct DNS resolution result is a mainland China IP, then use the direct result, otherwise use the remote result."
+msgstr "智能:同时转发给直连和远程 DNS,如果直连 DNS 解析结果是大陆 IP,则使用直连结果,否则使用远程结果。"
+
+msgid "In smart mode, no-ip reply from Direct DNS:"
+msgstr "使用智能模式,直连 DNS 返回空响应时:"
+
+msgid "Do not accept: Wait and use Remote DNS Reply."
+msgstr "不接受:等待并使用远程 DNS 的响应。"
+
+msgid "Accept: Trust the Reply, using this option can improve DNS resolution speeds for some mainland IPv4-only sites."
+msgstr "接受:信任空响应,使用此选项可以提升部分大陆仅 IPv4 站点的 DNS 解析速度。"
msgid "Filter Proxy Host IPv6"
msgstr "过滤代理域名 IPv6"
diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh
index 92a65d748..8e253f4fe 100755
--- a/luci-app-passwall/root/usr/share/passwall/app.sh
+++ b/luci-app-passwall/root/usr/share/passwall/app.sh
@@ -585,7 +585,10 @@ run_chinadns_ng() {
[ "${_no_ipv6_trust}" = "1" ] && echo "no-ipv6" >> ${_CONF_FILE}
}
- ([ -z "${_default_tag}" ] || [ "${_default_tag}" = "smart" ]) && _default_tag="none"
+ # 是否接受直连 DNS 空响应
+ [ "${_default_tag}" = "none_noip" ] && echo "noip-as-chnip" >> ${_CONF_FILE}
+
+ ([ -z "${_default_tag}" ] || [ "${_default_tag}" = "smart" ] || [ "${_default_tag}" = "none_noip" ]) && _default_tag="none"
echo "default-tag ${_default_tag}" >> ${_CONF_FILE}
ln_run "$(first_type chinadns-ng)" chinadns-ng "${_LOG_FILE}" -C ${_CONF_FILE}
diff --git a/patch-luci-app-passwall.patch b/patch-luci-app-passwall.patch
index 1bfa0173e..3ea198c52 100644
--- a/patch-luci-app-passwall.patch
+++ b/patch-luci-app-passwall.patch
@@ -24,7 +24,7 @@ index 1440118..be9dd12 100644
if code ~= 0 then
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
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 13bd889..dcd414b 100644
+index 521c8ff..5ca99e2 100644
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
@@ -332,6 +332,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9-Recommended)")