diff --git a/package/ntlf9t/luci-app-smartdns/Makefile b/package/ntlf9t/luci-app-smartdns/Makefile index 3693dc6c86..f756aed990 100644 --- a/package/ntlf9t/luci-app-smartdns/Makefile +++ b/package/ntlf9t/luci-app-smartdns/Makefile @@ -7,7 +7,7 @@ LUCI_DEPENDS:=+smartdns LUCI_PKGARCH:=all PKG_NAME:=luci-app-smartdns PKG_VERSION:=1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/ntlf9t/luci-app-smartdns/luasrc/model/cbi/smartdns/smartdns.lua b/package/ntlf9t/luci-app-smartdns/luasrc/model/cbi/smartdns/smartdns.lua index c823dfdd2c..6a3414d9cc 100644 --- a/package/ntlf9t/luci-app-smartdns/luasrc/model/cbi/smartdns/smartdns.lua +++ b/package/ntlf9t/luci-app-smartdns/luasrc/model/cbi/smartdns/smartdns.lua @@ -83,6 +83,14 @@ o.cfgvalue = function(...) return Flag.cfgvalue(...) or "0" end +---- Serve expired +o = s:taboption("settings", Flag, "serve_expired", translate("Serve expired"), translate("Attempts to serve old responses from cache with a TTL of 0 in the response without waiting for the actual resolution to finish.")) +o.rmempty = false +o.default = o.disabled +o.cfgvalue = function(...) + return Flag.cfgvalue(...) or "0" +end + ---- Redirect o = s:taboption("settings", ListValue, "redirect", translate("Redirect"), translate("SmartDNS redirect mode")) o.placeholder = "none" @@ -240,7 +248,8 @@ s:option(Value, "name", translate("DNS Server Name"), translate("DNS Server Name ---- IP address o = s:option(Value, "ip", translate("ip"), translate("DNS Server ip")) o.datatype = "or(ipaddr, string)" -o.rmempty = false +o.rmempty = false + ---- port o = s:option(Value, "port", translate("port"), translate("DNS Server port")) o.placeholder = "default" @@ -326,4 +335,3 @@ o.write = function() end return m - diff --git a/package/ntlf9t/luci-app-smartdns/po/zh_Hans/smartdns.po b/package/ntlf9t/luci-app-smartdns/po/zh_Hans/smartdns.po index 0d9579b1de..a712f0d2eb 100644 --- a/package/ntlf9t/luci-app-smartdns/po/zh_Hans/smartdns.po +++ b/package/ntlf9t/luci-app-smartdns/po/zh_Hans/smartdns.po @@ -73,6 +73,12 @@ msgstr "域名预加载" msgid "Enable domain prefetch, accelerate domain response speed." msgstr "启用域名预加载,加速域名响应速度。" +msgid "Serve expired" +msgstr "缓存过期服务" + +msgid "Attempts to serve old responses from cache with a TTL of 0 in the response without waiting for the actual resolution to finish." +msgstr "查询性能优化,有请求时尝试回应TTL为0的过期记录,以避免查询等待。" + msgid "Redirect" msgstr "重定向" diff --git a/package/ntlf9t/smartdns/Makefile b/package/ntlf9t/smartdns/Makefile index f300d947dd..feda1c7b79 100644 --- a/package/ntlf9t/smartdns/Makefile +++ b/package/ntlf9t/smartdns/Makefile @@ -17,7 +17,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=smartdns PKG_VERSION:=2.2020.19 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/pymumu/smartdns.git diff --git a/package/ntlf9t/smartdns/conf/smartdns.conf b/package/ntlf9t/smartdns/conf/smartdns.conf index f082049455..3af0356942 100644 --- a/package/ntlf9t/smartdns/conf/smartdns.conf +++ b/package/ntlf9t/smartdns/conf/smartdns.conf @@ -2,6 +2,7 @@ config smartdns option server_name 'smartdns' option dualstack_ip_selection '1' option prefetch_domain '1' + option serve_expired '1' option seconddns_no_speed_check '0' option seconddns_no_dualstack_selection '0' option seconddns_no_cache '0'