luci: add dns64 option
This commit is contained in:
@@ -126,7 +126,7 @@ rtt min/avg/max/mdev = 5.954/6.133/6.313/0.195 ms
|
|||||||
1. **高性能、占用资源少**
|
1. **高性能、占用资源少**
|
||||||
多线程异步 IO 模式,cache 缓存查询结果。
|
多线程异步 IO 模式,cache 缓存查询结果。
|
||||||
|
|
||||||
1. **主流系统官方支持**
|
1. **主流系统官方支持**
|
||||||
主流路由系统官方软件源安装smartdns。
|
主流路由系统官方软件源安装smartdns。
|
||||||
|
|
||||||
## 架构
|
## 架构
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ From the comparison, smartdns found the fastest IP address to visit www.baidu.co
|
|||||||
1. **High performance, low resource consumption**
|
1. **High performance, low resource consumption**
|
||||||
Multi-threaded asynchronous IO mode, cache cache query results.
|
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.
|
Support DNS forwarding, ipset and nftables. Support setting the domain result to ipset and nftset set when speed check fails.
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|||||||
@@ -82,6 +82,9 @@ msgstr "协议类型"
|
|||||||
msgid "DNS domain result cache size"
|
msgid "DNS domain result cache size"
|
||||||
msgstr "缓存DNS的结果,缓存大小,配置零则不缓存"
|
msgstr "缓存DNS的结果,缓存大小,配置零则不缓存"
|
||||||
|
|
||||||
|
msgid "DNS64 Server Settings"
|
||||||
|
msgstr "DNS64服务器配置"
|
||||||
|
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "描述"
|
msgstr "描述"
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ s.anonymous = true
|
|||||||
s:tab("settings", translate("General Settings"))
|
s:tab("settings", translate("General Settings"))
|
||||||
s:tab("advanced", translate('Advanced Settings'))
|
s:tab("advanced", translate('Advanced Settings'))
|
||||||
s:tab("seconddns", translate("Second Server Settings"))
|
s:tab("seconddns", translate("Second Server Settings"))
|
||||||
|
s:tab("dns64", translate("DNS64 Server Settings"))
|
||||||
s:tab("proxy", translate("Proxy Server Settings"))
|
s:tab("proxy", translate("Proxy Server Settings"))
|
||||||
s:tab("custom", translate("Custom Settings"))
|
s:tab("custom", translate("Custom Settings"))
|
||||||
|
|
||||||
@@ -371,6 +372,12 @@ function o.validate(self, value)
|
|||||||
return value
|
return value
|
||||||
end
|
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 settings
|
||||||
custom = s:taboption("custom", Value, "Custom Settings",
|
custom = s:taboption("custom", Value, "Custom Settings",
|
||||||
translate(""),
|
translate(""),
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ msgstr "协议类型"
|
|||||||
msgid "DNS domain result cache size"
|
msgid "DNS domain result cache size"
|
||||||
msgstr "缓存DNS的结果,缓存大小,配置零则不缓存"
|
msgstr "缓存DNS的结果,缓存大小,配置零则不缓存"
|
||||||
|
|
||||||
|
msgid "DNS64 Server Settings"
|
||||||
|
msgstr "DNS64服务器配置"
|
||||||
|
|
||||||
msgid "default"
|
msgid "default"
|
||||||
msgstr "默认"
|
msgstr "默认"
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ return view.extend({
|
|||||||
s.tab("settings", _("General Settings"));
|
s.tab("settings", _("General Settings"));
|
||||||
s.tab("advanced", _('Advanced Settings'));
|
s.tab("advanced", _('Advanced Settings'));
|
||||||
s.tab("seconddns", _("Second Server 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("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("proxy", _("Proxy Server Settings"));
|
||||||
s.tab("custom", _("Custom Settings"));
|
s.tab("custom", _("Custom Settings"));
|
||||||
@@ -430,6 +431,14 @@ return view.extend({
|
|||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.default = o.disabled;
|
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
|
// download Files Settings
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
|||||||
@@ -480,6 +480,7 @@ load_service()
|
|||||||
config_get port "$section" "port" "53"
|
config_get port "$section" "port" "53"
|
||||||
config_get ipv6_server "$section" "ipv6_server" "1"
|
config_get ipv6_server "$section" "ipv6_server" "1"
|
||||||
config_get tcp_server "$section" "tcp_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" ""
|
config_get speed_check_mode "$section" "speed_check_mode" ""
|
||||||
[ ! -z "$speed_check_mode" ] && conf_append "speed-check-mode" "$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" ""
|
config_get proxy_server "$section" "proxy_server" ""
|
||||||
[ -z "$proxy_server" ] || conf_append "proxy-server" "$proxy_server -name default-proxy"
|
[ -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 redirect "$section" "redirect" ""
|
||||||
config_get old_port "$section" "old_port" "0"
|
config_get old_port "$section" "old_port" "0"
|
||||||
config_get old_enabled "$section" "old_enabled" "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"
|
[ "$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"
|
load_second_server "$section"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user