diff --git a/ReadMe.md b/ReadMe.md index 7828413..690e7a2 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -126,7 +126,7 @@ rtt min/avg/max/mdev = 5.954/6.133/6.313/0.195 ms 1. **高性能、占用资源少** 多线程异步 IO 模式,cache 缓存查询结果。 -1. **主流系统官方支持** +1. **主流系统官方支持** 主流路由系统官方软件源安装smartdns。 ## 架构 diff --git a/ReadMe_en.md b/ReadMe_en.md index 53c61f4..db5e07a 100644 --- a/ReadMe_en.md +++ b/ReadMe_en.md @@ -121,7 +121,7 @@ From the comparison, smartdns found the fastest IP address to visit www.baidu.co 1. **High performance, low resource consumption** Multi-threaded asynchronous IO mode, cache cache query results. -1. **DNS domain forwarding** +1. **DNS domain forwarding** Support DNS forwarding, ipset and nftables. Support setting the domain result to ipset and nftset set when speed check fails. ## Architecture diff --git a/package/luci-compat/files/luci/i18n/smartdns.zh-cn.po b/package/luci-compat/files/luci/i18n/smartdns.zh-cn.po index a919757..01555ca 100644 --- a/package/luci-compat/files/luci/i18n/smartdns.zh-cn.po +++ b/package/luci-compat/files/luci/i18n/smartdns.zh-cn.po @@ -82,6 +82,9 @@ msgstr "协议类型" msgid "DNS domain result cache size" msgstr "缓存DNS的结果,缓存大小,配置零则不缓存" +msgid "DNS64 Server Settings" +msgstr "DNS64服务器配置" + msgid "Description" msgstr "描述" diff --git a/package/luci-compat/files/luci/model/cbi/smartdns/smartdns.lua b/package/luci-compat/files/luci/model/cbi/smartdns/smartdns.lua index 7b8ccc5..41cc551 100644 --- a/package/luci-compat/files/luci/model/cbi/smartdns/smartdns.lua +++ b/package/luci-compat/files/luci/model/cbi/smartdns/smartdns.lua @@ -34,6 +34,7 @@ s.anonymous = true s:tab("settings", translate("General Settings")) s:tab("advanced", translate('Advanced Settings')) s:tab("seconddns", translate("Second Server Settings")) +s:tab("dns64", translate("DNS64 Server Settings")) s:tab("proxy", translate("Proxy Server Settings")) s:tab("custom", translate("Custom Settings")) @@ -371,6 +372,12 @@ function o.validate(self, value) return value end +----- dns64 server settings +o = s:taboption("dns64", Value, "dns64", translate("DNS64")); +o.placeholder = "64:ff9b::/96" +o.datatype = 'ip6addr' +o.rmempty = true + ----- custom settings custom = s:taboption("custom", Value, "Custom Settings", translate(""), diff --git a/package/luci/files/luci/i18n/smartdns.zh-cn.po b/package/luci/files/luci/i18n/smartdns.zh-cn.po index 0d39cfb..f773f79 100644 --- a/package/luci/files/luci/i18n/smartdns.zh-cn.po +++ b/package/luci/files/luci/i18n/smartdns.zh-cn.po @@ -90,6 +90,9 @@ msgstr "协议类型" msgid "DNS domain result cache size" msgstr "缓存DNS的结果,缓存大小,配置零则不缓存" +msgid "DNS64 Server Settings" +msgstr "DNS64服务器配置" + msgid "default" msgstr "默认" diff --git a/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js b/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js index 08e4075..fd290ee 100644 --- a/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js +++ b/package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js @@ -131,6 +131,7 @@ return view.extend({ s.tab("settings", _("General Settings")); s.tab("advanced", _('Advanced Settings')); s.tab("seconddns", _("Second Server Settings")); + s.tab("dns64", _("DNS64 Server Settings")); s.tab("files", _("Download Files Setting"), _("Download domain list files for domain-rule and include config files, please refresh the page after download to take effect.")); s.tab("proxy", _("Proxy Server Settings")); s.tab("custom", _("Custom Settings")); @@ -430,6 +431,14 @@ return view.extend({ o.rmempty = false; o.default = o.disabled; + /////////////////////////////////////// + // DNS64 Settings + /////////////////////////////////////// + o = s.taboption("dns64", form.Value, "dns64", _("DNS64")); + o.placeholder = "64:ff9b::/96"; + o.datatype = "ip6addr"; + o.rempty = true; + /////////////////////////////////////// // download Files Settings /////////////////////////////////////// diff --git a/package/openwrt/files/etc/init.d/smartdns b/package/openwrt/files/etc/init.d/smartdns index f492a1e..5c7e932 100644 --- a/package/openwrt/files/etc/init.d/smartdns +++ b/package/openwrt/files/etc/init.d/smartdns @@ -480,6 +480,7 @@ load_service() config_get port "$section" "port" "53" config_get ipv6_server "$section" "ipv6_server" "1" config_get tcp_server "$section" "tcp_server" "1" + config_get server_flags "$section" "server_flags" "" config_get speed_check_mode "$section" "speed_check_mode" "" [ ! -z "$speed_check_mode" ] && conf_append "speed-check-mode" "$speed_check_mode" @@ -563,6 +564,9 @@ load_service() config_get proxy_server "$section" "proxy_server" "" [ -z "$proxy_server" ] || conf_append "proxy-server" "$proxy_server -name default-proxy" + config_get dns64 "$section" "dns64" "" + [ -z "$dns64" ] || conf_append "dns64" "$dns64" + config_get redirect "$section" "redirect" "" config_get old_port "$section" "old_port" "0" config_get old_enabled "$section" "old_enabled" "0" @@ -629,7 +633,7 @@ load_service() [ "$auto_set_dnsmasq" = "0" ] && [ "$old_auto_set_dnsmasq" = "1" ] && stop_forward_dnsmasq "$old_port" "0" } - conf_append_bind "$port" "$device" "$tcp_server" "$ipv6_server" "$ARGS" + conf_append_bind "$port" "$device" "$tcp_server" "$ipv6_server" "$server_flags" load_second_server "$section"