up luci-app-smartdns

This commit is contained in:
SirPdboy 2023-10-30 11:04:33 +08:00 committed by GitHub
parent 5a2c3384f1
commit 9e62355665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 313 additions and 155 deletions

View File

@ -1,12 +1,24 @@
#
# Copyright 2018-2020 Nick Peng <pymumu@gmail.com>
# Licensed to the public under the GPL V3 License.
# Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
#
# smartdns is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# smartdns is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
include $(TOPDIR)/rules.mk
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Nick Peng <pymumu@gmail.com>
PKG_VERSION:=1.2023.41
PKG_VERSION:=1.2023.43
PKG_RELEASE:=1
LUCI_TITLE:=LuCI for smartdns

View File

@ -1,5 +1,5 @@
--
-- Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
-- Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
--
-- smartdns is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
--
-- Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
-- Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
--
-- smartdns is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -70,6 +70,7 @@ o = s:taboption("advanced", Value, "speed_check_mode", translate("Speed Check Mo
o.rmempty = true;
o.placeholder = "default";
o.default = o.enabled;
o:value("", translate("default"))
o:value("ping,tcp:80,tcp:443");
o:value("ping,tcp:443,tcp:80");
o:value("tcp:80,tcp:443,ping");
@ -161,7 +162,7 @@ end
---- Domain prefetch load
o = s:taboption("advanced", Flag, "prefetch_domain", translate("Domain prefetch"), translate("Enable domain prefetch, accelerate domain response speed."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -182,8 +183,8 @@ o.rempty = true
---- cache-persist;
o = s:taboption("advanced", Flag, "cache_persist", translate("Cache Persist"), translate("Write cache to disk on exit and load on startup."))
o.rmempty = false;
o.default = o.enabled;
o.rmempty = false
o.default = o.enabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "1"
end
@ -198,8 +199,8 @@ end
-- Force AAAA SOA
o = s:taboption("advanced", Flag, "force_aaaa_soa", translate("Force AAAA SOA"), translate("Force AAAA SOA."))
o.rmempty = false
o.default = o.enabled
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
end
@ -267,6 +268,12 @@ uci:foreach("smartdns", "download-file", function(section)
o:value(section.name);
end)
---- other args
o = s:taboption("advanced", Value, "server_flags", translate("Additional Server Args"), translate("Additional server args, refer to the help description of the bind option."))
o.default = ""
o.rempty = true
o.optional = true
---- second dns server
---- Eanble
o = s:taboption("seconddns", Flag, "seconddns_enabled", translate("Enable"), translate("Enable or disable second DNS server."))
@ -296,7 +303,7 @@ o.datatype = "hostname"
o.rempty = true
o = s:taboption("seconddns", Flag, "seconddns_no_speed_check", translate("Skip Speed Check"), translate("Do not check speed."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -304,7 +311,7 @@ end
---- skip address rules
o = s:taboption("seconddns", Flag, "seconddns_no_rule_addr", translate("Skip Address Rules"), translate("Skip address rules."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -312,7 +319,7 @@ end
---- skip name server rules
o = s:taboption("seconddns", Flag, "seconddns_no_rule_nameserver", translate("Skip Nameserver Rule"), translate("Skip nameserver rules."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -320,7 +327,7 @@ end
---- skip ipset rules
o = s:taboption("seconddns", Flag, "seconddns_no_rule_ipset", translate("Skip Ipset Rule"), translate("Skip ipset rules."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -328,14 +335,14 @@ end
---- skip soa address rule
o = s:taboption("seconddns", Flag, "seconddns_no_rule_soa", translate("Skip SOA Address Rule"), translate("Skip SOA address rules."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
end
o = s:taboption("seconddns", Flag, "seconddns_no_dualstack_selection", translate("Skip Dualstack Selection"), translate("Skip Dualstack Selection."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -343,7 +350,7 @@ end
---- skip cache
o = s:taboption("seconddns", Flag, "seconddns_no_cache", translate("Skip Cache"), translate("Skip Cache."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -351,12 +358,39 @@ end
---- Force AAAA SOA
o = s:taboption("seconddns", Flag, "seconddns_force_aaaa_soa", translate("Force AAAA SOA"), translate("Force AAAA SOA."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
end
o = s:taboption("seconddns", Value, "seconddns_ipset_name", translate("IPset Name"), translate("IPset name."))
o.rmempty = true
o.datatype = "hostname"
o.rempty = true
o = s:taboption("seconddns", Value, "seconddns_nftset_name", translate("NFTset Name"), translate("NFTset name, format: [#[4|6]:[family#table#set]]"))
o.rmempty = true
o.datatype = "string"
o.rempty = true
function o.validate(self, value)
if (value == "") then
return value
end
if (value:match("#[4|6]:[a-zA-Z0-9%-_]+#[a-zA-Z0-9%-_]+#[a-zA-Z0-9%-_]+$")) then
return value
end
return nil, translate("NFTset name format error, format: [#[4|6]:[family#table#set]]")
end
---- other args
o = s:taboption("seconddns", Value, "seconddns_server_flags", translate("Additional Server Args"), translate("Additional server args, refer to the help description of the bind option."))
o.default = ""
o.rempty = true
o.optional = true
----- Proxy server settings
o = s:taboption("proxy", Value, "proxy_server", translate("Proxy Server"), translate("Proxy Server URL, format: [socks5|http]://user:pass@ip:port."));
o.datatype = 'string';
@ -396,12 +430,36 @@ function custom.write(self, section, value)
end
o = s:taboption("custom", Flag, "coredump", translate("Generate Coredump"), translate("Generate Coredump file when smartdns crash, coredump file is located at /tmp/smartdns.xxx.core."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
end
o = s:taboption("custom", Value, "log_size", translate("Log Size"))
o.rmempty = true
o.placeholder = "default"
o = s:taboption("custom", ListValue, "log_level", translate("Log Level"))
o.rmempty = true
o.placeholder = "default"
o:value("", translate("default"))
o:value("debug")
o:value("info")
o:value("notice")
o:value("warn")
o:value("error")
o:value("fatal")
o:value("off")
o = s:taboption("custom", Value, "log_num", translate("Log Number"))
o.rmempty = true
o.placeholder = "default"
o = s:taboption("custom", Value, "log_file", translate("Log File"))
o.rmempty = true
o.placeholder = "/var/log/smartdns/smartdns.log"
-- Upstream servers
s = m:section(TypedSection, "server", translate("Upstream Servers"), translate("Upstream Servers, support UDP, TCP protocol. " ..
"Please configure multiple DNS servers, including multiple foreign DNS servers."))
@ -412,7 +470,7 @@ s.template = "cbi/tblsection"
s.extedit = luci.dispatcher.build_url("admin/services/smartdns/upstream/%s")
---- enable flag
o = s:option(Flag, "enabled", translate("Enable"))
o = s:option(Flag, "enabled", translate("Enable"), translate("Enable"))
o.rmempty = false
o.default = o.enabled
o.cfgvalue = function(...)
@ -420,14 +478,14 @@ o.cfgvalue = function(...)
end
---- name
s:option(Value, "name", translate("DNS Server Name"))
s:option(Value, "name", translate("DNS Server Name"), translate("DNS Server Name"))
---- IP address
o = s:option(Value, "ip", translate("DNS Server ip"))
o = s:option(Value, "ip", translate("ip"), translate("DNS Server ip"))
o.datatype = "or(ipaddr, string)"
o.rmempty = false
---- port
o = s:option(Value, "port", translate("DNS Server port"))
o = s:option(Value, "port", translate("port"), translate("DNS Server port"))
o.placeholder = "default"
o.datatype = "port"
o.rempty = true
@ -436,7 +494,7 @@ o:depends("type", "tcp")
o:depends("type", "tls")
---- type
o = s:option(ListValue, "type", translate("DNS Server type"))
o = s:option(ListValue, "type", translate("type"), translate("DNS Server type"))
o.placeholder = "udp"
o:value("udp", translate("udp"))
o:value("tcp", translate("tcp"))
@ -500,11 +558,11 @@ end
o = s:taboption("forwarding", Flag, "no_speed_check", translate("Skip Speed Check"),
translate("Do not check speed."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o = s:taboption("forwarding", Flag, "force_aaaa_soa", translate("Force AAAA SOA"), translate("Force AAAA SOA."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o = s:taboption("forwarding", Value, "ipset_name", translate("IPset Name"), translate("IPset name."))
@ -614,10 +672,14 @@ s.anonymous = true
---- download Files Settings
o = s:option(Flag, "enable_auto_update", translate("Enable Auto Update"), translate("Enable daily auto update."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.rempty = true
o = s:option(ListValue, "auto_update_day_time", translate("Update time (every day)"))
for i = 0, 23 do o:value(i, i .. ":00") end
o.default = 5
o = s:option(FileUpload, "upload_conf_file", translate("Upload Config File"),
translate("Upload smartdns config file to /etc/smartdns/conf.d"))
o.rmempty = true
@ -636,7 +698,7 @@ o.root_directory = "/etc/smartdns/domain-set"
o = s:option(Button, "_updateate")
o.title = translate("Update Files")
o.inputtitle = translate("update domain list files")
o.inputtitle = translate("Update Files")
o.inputstyle = "apply"
o.write = function()
luci.sys.call("/etc/init.d/smartdns updatefiles >/dev/null 2>&1")
@ -647,12 +709,12 @@ s.anonymous = true
s.addremove = true
s.template = "cbi/tblsection"
o = s:option(Value, 'name', translate('File Name'))
o.rmempty = false
o = s:option(Value, 'name', translate('File Name'), translate('File Name'))
o.rmempty = true
o.datatype = 'string'
o = s:option(Value, 'url', translate('URL'))
o.rmempty = false
o = s:option(Value, 'url', translate('URL'), translate('URL'))
o.rmempty = true
o.datatype = 'string'
function o.validate(self, value, section)
if value == "" then
@ -674,13 +736,13 @@ function o.validate(self, value, section)
return nil, translate("URL format error, format: http:// or https://")
end
o = s:option(ListValue, "type", translate("File Type"))
o = s:option(ListValue, "type", translate("type"), translate("File Type"))
o:value("list", translate("domain list (/etc/smartdns/domain-set)"))
o:value("config", translate("smartdns config (/etc/smartdns/conf.d)"))
o.default = "list"
o.rempty = false
o = s:option(Value, 'desc', translate('Description'))
o = s:option(Value, 'desc', translate('Description'), translate('Description'))
o.rmempty = true
o.datatype = 'string'
@ -714,7 +776,7 @@ o.write = function()
end
o = s:option(Button, "Restart")
o.title = translate("Restart smartdns")
o.title = translate("Restart Service")
o.inputtitle = translate("Restart")
o.inputstyle = "apply"
o.write = function()

View File

@ -1,5 +1,5 @@
--
-- Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
-- Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
--
-- smartdns is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -56,7 +56,7 @@ o.default = "udp"
o.rempty = false
---- server group
o = s:option(Value, "server_group", translate("Server Group"), translate("DNS Server group belongs to, used with nameserver, such as office, home."))
o = s:option(Value, "server_group", translate("Server Group"), translate("DNS Server group belongs to, such as office, home."))
o.rmempty = true
o.placeholder = "default"
o.datatype = "hostname"
@ -64,14 +64,14 @@ o.rempty = true
---- exclude default group
o = s:option(Flag, "exclude_default_group", translate("Exclude Default Group"), translate("Exclude DNS Server from default group."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.editable = true
o.modalonly = true
---- blacklist_ip
o = s:option(Flag, "blacklist_ip", translate("IP Blacklist Filtering"), translate("Filtering IP with blacklist"))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -87,7 +87,7 @@ o:depends("type", "https")
---- certificate verify
o = s:option(Flag, "no_check_certificate", translate("No check certificate"), translate("Do not check certificate."))
o.rmempty = false
o.rmempty = true
o.default = o.disabled
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "0"
@ -154,6 +154,5 @@ end
o = s:option(Value, "addition_arg", translate("Additional Server Args"), translate("Additional Args for upstream dns servers"))
o.default = ""
o.rempty = true
o.optional = true
return m

View File

@ -1,5 +1,5 @@
--
-- Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
-- Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
--
-- smartdns is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by

View File

@ -1,27 +1,28 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "smartdns", "status")%>', null,
function(x, data) {
var tb = document.getElementById('smartdns_status');
if (data && tb) {
var links = "";
if (data.running) {
links = '<b><font color=green>SmartDNS - <%:RUNNING%></font></b></em>';
if (data.dnsmasq_redirect_failure == 1) {
XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "smartdns", "status")%>', null,
function(x, data) {
var tb = document.getElementById('smartdns_status');
if (data && tb) {
var links = "";
if (data.running) {
links = '<b><font color=green>SmartDNS - <%:RUNNING%></font></b></em>';
if (data.dnsmasq_redirect_failure == 1) {
links += "<br></br><b><font color=red><%:Dnsmasq Forwarded To Smartdns Failure%></font></b>"
}
} else {
links = '<b><font color=red>SmartDNS - <%:NOT RUNNING%></font></b>';
}
} else {
links = '<b><font color=red>SmartDNS - <%:NOT RUNNING%></font></b>';
tb.innerHTML = links;
}
tb.innerHTML = links;
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="smartdns_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="smartdns_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -2,15 +2,19 @@
msgid "Additional Args for upstream dns servers"
msgstr "额外的上游 DNS 服务器参数"
msgid ""
"Additional Flags for rules, read help on domain-rule for more information."
msgstr "额外的规则标识具体参考domain-rule的帮助说明。"
msgid "Additional Rule Flag"
msgstr "额外规则标识"
msgid "Additional Flags for rules, read help on domain-rule for more information."
msgstr "额外的规则标识具体参考domain-rule的帮助说明。"
msgid "Additional Server Args"
msgstr "额外的服务器参数"
msgid "Additional server args, refer to the help description of the bind option."
msgstr "额外的服务器参数参考bind选项的帮助说明。"
msgid "Advanced Settings"
msgstr "高级设置"
@ -23,7 +27,7 @@ msgid "Automatically Set Dnsmasq"
msgstr "自动设置Dnsmasq"
msgid "Automatically set as upstream of dnsmasq when port changes."
msgstr "自动设置为Dnsmasq的上游服务器"
msgstr "端口更改时自动设为 dnsmasq 的上游。"
msgid "Bind Device"
msgstr "绑定到设备"
@ -31,13 +35,19 @@ msgstr "绑定到设备"
msgid "Bind Device Name"
msgstr "绑定的设备名称"
msgid "Block domain"
msgstr "屏蔽域名"
msgid "Block domain."
msgstr "屏蔽域名。"
msgid "Cache Persist"
msgstr "持久化缓存"
msgid "Cache Size"
msgstr "缓存大小"
msgid "Collecting data..."
msgid "Collecting data ..."
msgstr "正在收集数据..."
msgid ""
@ -48,6 +58,9 @@ msgstr "配置需要从指定域名服务器结果过滤的IP黑名单。"
msgid "Configure block domain list."
msgstr "配置屏蔽域名列表"
msgid "Configure domain rule list."
msgstr "配置域名规则列表"
msgid "Configure forwarding domain name list."
msgstr "配置分流域名列表"
@ -63,12 +76,11 @@ msgstr "域名分流设置"
msgid "DNS Server Name"
msgstr "DNS服务器名称"
msgid "DNS Server group belongs to, such as office, home."
msgstr "配置归属服务器组例如office, home"
msgid "DNS Server group"
msgstr "服务器组"
msgid ""
"DNS Server group belongs to, used with nameserver, such as office, home."
msgstr "DNS服务器所属组 配合nameserver使用例如officehome。"
msgid "DNS Server group belongs to, such as office, home."
msgstr "设置服务器组例如officehome"
msgid "DNS Server ip"
msgstr "DNS服务器IP"
@ -80,14 +92,23 @@ msgid "DNS Server type"
msgstr "协议类型"
msgid "DNS domain result cache size"
msgstr "缓存DNS的结果缓存大小配置零则不缓存"
msgstr "缓存DNS的结果缓存大小配置零则不缓存。"
msgid "DNS64"
msgstr "DNS64"
msgid "DNS64 Server Settings"
msgstr "DNS64服务器配置"
msgid "default"
msgstr "默认"
msgid "Description"
msgstr "描述"
msgid "Dnsmasq Forwarded To Smartdns Failure"
msgstr "重定向dnsmasq到smartdns失败"
msgid "Do not check certificate."
msgstr "不校验证书的合法性。"
@ -103,6 +124,12 @@ msgstr "域名列表"
msgid "Domain List File"
msgstr "域名列表文件"
msgid "Domain Rule List"
msgstr "域名规则列表"
msgid "Domain Rule Name"
msgstr "域名规则名称"
msgid "Domain Rules"
msgstr "域名规则"
@ -136,7 +163,8 @@ msgstr "下载文件设置"
msgid ""
"Download domain list files for domain-rule and include config files, please "
"refresh the page after download to take effect."
msgstr "下载域名文件列表,下载后刷新页面生效"
msgstr ""
"下载域名规则所需要的域名列表文件和smartdns配置文件下载完成后刷新页面。"
msgid "Dual-stack IP Selection"
msgstr "双栈IP优选"
@ -148,16 +176,19 @@ msgid "Enable Auto Update"
msgstr "启用自动更新"
msgid "Enable IP selection between IPV4 and IPV6"
msgstr "启用 IPV4 和 IPV6 间的 IP 优选策略"
msgstr "启用 IPV4 和 IPV6 间的 IP 优选策略"
msgid "Enable IPV6 DNS Server"
msgstr "启用IPV6服务器"
msgstr "启用IPV6服务器"
msgid "Enable TCP DNS Server"
msgstr "启用TCP服务器"
msgstr "启用TCP服务器"
msgid "Enable daily auto update."
msgstr "启用每日自动更新。"
msgstr "启用每日自动更新"
msgid "Update time (every day)"
msgstr "更新时间(每天)"
msgid "Enable domain prefetch, accelerate domain response speed."
msgstr "启用域名预加载,加速域名响应速度。"
@ -169,10 +200,16 @@ msgid "Enable or disable smartdns server"
msgstr "启用或禁用SmartDNS服务"
msgid "Exclude DNS Server from default group."
msgstr "从default默认服务器组中排除"
msgstr "从default默认服务器组中排除"
msgid "Exclude Default Group"
msgstr "从默认服务器组排除"
msgstr "从默认组中排除"
msgid "Fastest IP"
msgstr "最快IP"
msgid "Fastest Response"
msgstr "最快响应"
msgid "File Name"
msgstr "文件名"
@ -186,12 +223,6 @@ msgstr "使用IP黑名单过滤"
msgid "First Ping"
msgstr "最快PING"
msgid "Fastest IP"
msgstr "最快IP"
msgid "Fastest Response"
msgstr "最快响应"
msgid "Force AAAA SOA"
msgstr "停用IPV6地址解析"
@ -216,6 +247,9 @@ msgid ""
msgstr ""
"当smartdns异常时生成coredump文件coredump文件在/tmp/smartdns.xxx.core."
msgid "Grant access to LuCI app smartdns"
msgstr "授予访问 LuCI 应用 smartdns 的权限"
msgid "HTTP Host"
msgstr "HTTP主机"
@ -229,30 +263,29 @@ msgid "IPV6 Server"
msgstr "IPV6服务器"
msgid "IPset Name"
msgstr "IPSet名称"
msgstr "IPset名称"
msgid "IPset name."
msgstr "IPSet名称。"
msgid "Ipset name, Add domain result to ipset when speed check fails."
msgstr "IPset名称当测速失败时将查询到的结果添加到对应的IPSet集合中。"
msgid "ipset name format error, format: [#[4|6]:]ipsetname"
msgstr "IPset名称格式错误格式[#[4|6]:]ipsetname"
msgstr "IPset名称。"
msgid "If you like this software, please buy me a cup of coffee."
msgstr "如果本软件对你有帮助,请给作者加个蛋。"
msgid "Include Config Files<br>/etc/smartdns/conf.d"
msgstr "包含配置文件"
msgstr "包含配置文件<br>/etc/smartdns/conf.d"
msgid ""
"Include other config files from /etc/smartdns/conf.d or custom path, can be "
"downloaded from the download page."
msgstr "包含配置文件,路径为/etc/smartdns/conf.d或自定义配置文件路径可以从下载页"
msgstr ""
"包含配置文件,路径为/etc/smartdns/conf.d或自定义配置文件路径可以从下载页"
"配置自动下载。面配置自动下载。"
msgid "Ipset name, Add domain result to ipset when speed check fails."
msgstr "IPset名称当测速失败时将查询到的结果添加到对应的IPSet集合中。"
msgid "List of files to download."
msgstr "下载的文件列表。"
msgstr "下载文件列表。"
msgid "Listen only on the specified interfaces."
msgstr "监听在指定的设备上避免非本地网络的DNS查询请求。"
@ -260,21 +293,27 @@ msgstr "监听在指定的设备上避免非本地网络的DNS查询请求。
msgid "Local Port"
msgstr "本地端口"
msgid "Log Size"
msgstr "日志大小"
msgid "Log Level"
msgstr "日志级别"
msgid "Log Number"
msgstr "日志数量"
msgid "Log File"
msgstr "日志文件路径"
msgid "Marking Packets"
msgstr "数据包标记"
msgid "Set mark on packets."
msgstr "设置数据包标记。"
msgid "Maximum TTL for all domain result."
msgstr "所有域名的最大 TTL 值。"
msgid "Minimum TTL for all domain result."
msgstr "所有域名的最小 TTL 值。"
msgid "Name of device name listen on."
msgstr "绑定的设备名称。"
msgid "NFTset Name"
msgstr "NFTSet名称"
@ -284,36 +323,51 @@ msgstr "NFTSet名称格式错误格式[#[4|6]:[family#table#set]]"
msgid "NFTset name, format: [#[4|6]:[family#table#set]]"
msgstr "NFTSet名称格式[#[4|6]:[family#table#set]]"
msgid "Nftset name, Add domain result to nftset when speed check fails, format: [#[4|6]:[family#table#set]]"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "Name of device name listen on."
msgstr "绑定的设备名称。"
msgid ""
"Nftset name, Add domain result to nftset when speed check fails, format: "
"[#[4|6]:[family#table#set]]"
msgstr "NFTset名称当测速失败时将查询到的结果添加到对应的NFTSet集合中。"
msgid "No"
msgstr "否"
msgid "No Speed IPset Name"
msgstr "无速度时IPSet名称"
msgid "No Speed NFTset Name"
msgstr "无速度时NFTSet名称"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "No check certificate"
msgstr "停用证书校验"
msgid "None"
msgstr "无"
msgid "Only socks5 proxy support udp server."
msgstr "仅SOCKS5代理支持UDP服务器。"
msgid "Please set proxy server first."
msgstr "请先设置代理服务器。"
msgid "Proxy Server"
msgstr "代理服务器"
msgid "Proxy Server Settings"
msgstr "代理服务器设置"
msgid "Proxy Server URL, format: [socks5|http]://user:pass@ip:port."
msgstr "代理服务器地址,格式:[socks5|http]://user:pass@ip:port。"
msgid "Proxy server URL format error, format: [socks5|http]://user:pass@ip:port."
msgid ""
"Proxy server URL format error, format: [socks5|http]://user:pass@ip:port."
msgstr "代理服务器地址格式错误,格式:[socks5|http]://user:pass@ip:port。"
msgid "Proxy Server Settings"
msgstr "代理服务器设置"
msgid "Query DNS through specific dns server group, such as office, home."
msgstr "使用指定服务器组查询比如office, home。"
@ -326,21 +380,24 @@ msgstr "回应的域名TTL最大值"
msgid "Reply maximum TTL for all domain result."
msgstr "设置返回给客户端的域名TTL最大值。"
msgid "Report bugs"
msgstr "报告BUG"
msgid "Resolve Local Hostnames"
msgstr "解析本地主机名"
msgid "Resolve local hostnames by reading Dnsmasq lease file."
msgstr "读取Dnsmasq的租约文件解析本地主机名。"
msgid "Response Mode"
msgstr "响应模式"
msgid "Restart"
msgstr "重启"
msgid "Restart smartdns"
msgid "Restart Service"
msgstr "重启服务"
msgid "Response Mode"
msgstr "响应模式"
msgid "Second Server Settings"
msgstr "第二DNS服务器"
@ -350,8 +407,8 @@ msgstr "缓存过期服务"
msgid "Server Group"
msgstr "服务器组"
msgid "Server Group not exists"
msgstr "服务器组不存在"
msgid "Server Group %s not exists"
msgstr "服务器组%s不存在"
msgid "Server Name"
msgstr "服务器名称"
@ -359,19 +416,25 @@ msgstr "服务器名称"
msgid "Set Specific domain ip address."
msgstr "设置指定域名的IP地址。"
msgid "Set Specific domain rule list."
msgstr "设置指定域名的规则列表。"
msgid "Set Specific ip blacklist."
msgstr "设置指定的 IP 黑名单列表。"
msgid "Set TLS hostname to verify."
msgstr "设置校验TLS主机名。"
msgid "Set mark on packets."
msgstr "设置数据包标记。"
msgid ""
"Set the HTTP host used for the query. Use this parameter when the host of "
"the URL address is an IP address."
msgstr "设置查询时使用的HTTP主机当URL地址的host是IP地址时使用此参数。"
msgid "Sets the server name indication for query."
msgstr "设置查询时使用的服务器SNI名称。"
msgid "Sets the server name indication for query. '-' for disable SNI name."
msgstr "设置服务器SNI名称-’表示禁用SNI名称。"
msgid "Settings"
msgstr "设置"
@ -438,25 +501,18 @@ msgid ""
msgstr ""
"SmartDNS本地服务端口当端口号设置为53时smartdns将会自动配置为主dns。"
msgid ""
"Smartdns response mode, First Ping: return the first ping IP, Fastest IP: "
"return the fastest IP, Fastest Response: return the fastest DNS response."
msgstr ""
"SmartDNS响应模式最快PING 返回最早有ping结果的IP速度适中最快IP 返回"
"最快IP查询请求可能延长 最快响应:返回最快响应的结果,查询请求时间短。"
msgid "Smartdns server name"
msgstr "SmartDNS的服务器名称默认为smartdns留空为主机名"
msgid "Speed check mode is invalid."
msgstr "测速模式无效。"
msgid "Speed Check Mode"
msgstr "测速模式"
msgid "Smartdns speed check mode. "
msgstr "SmartDns测速模式设置。"
msgid ""
"Smartdns response mode, First Ping: return the first ping IP, "
"Fastest IP: return the fastest IP, Fastest Response: return the fastest "
"DNS response."
msgstr ""
"SmartDNS响应模式最快PING 返回最早有ping结果的IP速度适中最快IP "
"返回最快IP查询请求可能延长 最快响应:返回最快响应的结果。查询请求时间短。"
msgid "Smartdns speed check mode."
msgstr "SmartDNS测速模式。"
msgid ""
"Specify an IP address to return for any host in the given domains, Queries "
@ -466,12 +522,18 @@ msgstr ""
"配置特定域名返回特定的IP地址域名查询将不到上游服务器请求直接返回配置的IP"
"地址,可用于广告屏蔽。"
msgid "Report bugs"
msgstr "报告BUG"
msgid "Speed Check Mode"
msgstr "测速模式"
msgid "Speed check mode is invalid."
msgstr "测速模式无效。"
msgid "TCP Server"
msgstr "TCP服务器"
msgid "TCP port is empty"
msgstr "TCP端口号为空"
msgid "TLS Hostname Verify"
msgstr "校验TLS主机名"
@ -487,18 +549,15 @@ msgstr "设置所有域名的 TTL 值。"
msgid "Technical Support"
msgstr "技术支持"
msgid "Use Proxy"
msgstr "使用代理"
msgid "Use proxy to connect to upstream DNS server."
msgstr "使用代理连接上游DNS服务器。"
msgid "URL"
msgstr "URL"
msgid "URL format error, format: http:// or https://"
msgstr "URL格式错误格式http://或https://"
msgid "Update"
msgstr "更新"
msgid "Update Files"
msgstr "更新文件"
@ -509,7 +568,7 @@ msgid "Upload Domain List File"
msgstr "上传域名列表文件"
msgid "Upload domain list file to /etc/smartdns/domain-set"
msgstr "上传域名列表文件到/etc/smartdns/domain-set目录"
msgstr "上传域名列表文件到/etc/smartdns/domain-set"
msgid ""
"Upload domain list file, or configure auto download from Download File "
@ -517,13 +576,13 @@ msgid ""
msgstr "上传域名列表文件,或在下载文件设置页面设置自动下载。"
msgid "Upload domain list file."
msgstr "上传域名列表文件"
msgstr "上传域名列表文件"
msgid "Upload smartdns config file to /etc/smartdns/conf.d"
msgstr "上传配置文件到/etc/smartdns/conf.d目录"
msgstr "上传配置文件到/etc/smartdns/conf.d"
msgid "Upstream DNS Server Configuration"
msgstr "上游服务器配置"
msgstr "上游DNS服务器配置"
msgid "Upstream Servers"
msgstr "上游服务器"
@ -535,6 +594,12 @@ msgstr ""
"上游 DNS 服务器,支持 UDPTCP 协议。请配置多个上游 DNS 服务器,包括多个国内"
"外服务器。"
msgid "Use Proxy"
msgstr "使用代理"
msgid "Use proxy to connect to upstream DNS server."
msgstr "使用代理连接上游DNS服务器。"
msgid ""
"Used to verify the validity of the TLS server, The value is Base64 encoded "
"SPKI fingerprint, leaving blank to indicate that the validity of TLS is not "
@ -546,6 +611,12 @@ msgstr ""
msgid "Write cache to disk on exit and load on startup."
msgstr "退出时保存cache到磁盘启动时加载。"
msgid "Yes"
msgstr "是"
msgid "default"
msgstr "默认"
msgid "domain list (/etc/smartdns/domain-set)"
msgstr "域名列表(/etc/smartdns/domain-set"
@ -555,6 +626,9 @@ msgstr "https"
msgid "ip"
msgstr "ip"
msgid "ipset name format error, format: [#[4|6]:]ipsetname"
msgstr "IPset名称格式错误格式[#[4|6]:]ipsetname"
msgid "open website"
msgstr "打开网站"
@ -562,7 +636,7 @@ msgid "port"
msgstr "端口"
msgid "smartdns config (/etc/smartdns/conf.d)"
msgstr "配置文件(/etc/smartdns/conf.d"
msgstr "smartdns 配置文件(/etc/smartdns/conf.d"
msgid "smartdns custom settings"
msgstr "smartdns 自定义设置,具体配置参数参考指导"
@ -578,6 +652,3 @@ msgstr "类型"
msgid "udp"
msgstr "udp"
msgid "update domain list files"
msgstr "更新列表文件"

View File

@ -1,6 +1,19 @@
#!/bin/sh
# Copyright 2018-2020 Nick Peng <pymumu@gmail.com>
# Licensed to the public under the GPL V3 License.
#
# Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
#
# smartdns is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# smartdns is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
uci -q batch <<-EOF >/dev/null
delete ucitrack.@smartdns[-1]