mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update 2023-12-31 16:21:47
This commit is contained in:
parent
f20f61ff68
commit
ace057f885
@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsproxy
|
||||
PKG_VERSION:=0.61.0
|
||||
PKG_VERSION:=0.61.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=0b75b8d8139992e77df39492d41ca7060553f80a13d7e0436f3d8e1616146b92
|
||||
PKG_HASH:=803af1704f8970e55a76e5af840f1fca0867624af7ef21d15e665a9f292244e8
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
@ -239,7 +239,7 @@ o.cfgvalue = function(...)
|
||||
return Flag.cfgvalue(...) or "1"
|
||||
end
|
||||
|
||||
-- cache-size
|
||||
-- resolve local hostname
|
||||
o = s:taboption("advanced", Flag, "resolve_local_hostnames", translate("Resolve Local Hostnames"), translate("Resolve local hostnames by reading Dnsmasq lease file."))
|
||||
o.rmempty = false
|
||||
o.default = o.enabled
|
||||
@ -247,6 +247,14 @@ o.cfgvalue = function(...)
|
||||
return Flag.cfgvalue(...) or "1"
|
||||
end
|
||||
|
||||
-- resolve local network hostname via mDNS
|
||||
o = s:taboption("advanced", Flag, "mdns_lookup", translate("mDNS Lookup"), translate("Resolve local network hostname via mDNS protocol."))
|
||||
o.rmempty = true
|
||||
o.default = o.disabled
|
||||
o.cfgvalue = function(...)
|
||||
return Flag.cfgvalue(...) or "0"
|
||||
end
|
||||
|
||||
-- Force AAAA SOA
|
||||
o = s:taboption("advanced", Flag, "force_aaaa_soa", translate("Force AAAA SOA"), translate("Force AAAA SOA."))
|
||||
o.rmempty = true
|
||||
@ -414,6 +422,13 @@ o.cfgvalue = function(...)
|
||||
return Flag.cfgvalue(...) or "0"
|
||||
end
|
||||
|
||||
o = s:taboption("seconddns", Flag, "seconddns_no_ip_alias", translate("Skip IP Alias"))
|
||||
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"
|
||||
@ -486,10 +501,6 @@ 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"
|
||||
@ -502,13 +513,53 @@ 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", ListValue, "log_output_mode", translate("Log Output Mode"));
|
||||
o.rmempty = true;
|
||||
o.placeholder = translate("file");
|
||||
o:value("file", translate("file"));
|
||||
o:value("syslog", translate("syslog"));
|
||||
|
||||
o = s:taboption("custom", Value, "log_size", translate("Log Size"));
|
||||
o.rmempty = true;
|
||||
o.placeholder = "default";
|
||||
o:depends("log_output_mode", "file");
|
||||
|
||||
o = s:taboption("custom", Value, "log_num", translate("Log Number"));
|
||||
o.rmempty = true;
|
||||
o.placeholder = "default";
|
||||
o:depends("log_output_mode", "file");
|
||||
|
||||
o = s:taboption("custom", Value, "log_file", translate("Log File"))
|
||||
o.rmempty = true
|
||||
o.placeholder = "/var/log/smartdns/smartdns.log"
|
||||
o:depends("log_output_mode", "file");
|
||||
|
||||
o = s:taboption("custom", Flag, "enable_audit_log", translate("Enable Audit Log"));
|
||||
o.rmempty = true;
|
||||
o.default = o.disabled;
|
||||
o.rempty = true;
|
||||
|
||||
o = s:taboption("custom", ListValue, "audit_log_output_mode", translate("Audit Log Output Mode"));
|
||||
o.rmempty = true;
|
||||
o.placeholder = translate("file");
|
||||
o:value("file", translate("file"));
|
||||
o:value("syslog", translate("syslog"));
|
||||
o:depends("enable_audit_log", "1");
|
||||
|
||||
o = s:taboption("custom", Value, "audit_log_size", translate("Audit Log Size"));
|
||||
o.rmempty = true;
|
||||
o.placeholder = "default";
|
||||
o:depends({enable_audit_log = "1", audit_log_output_mode = "file"});
|
||||
|
||||
o = s:taboption("custom", Value, "audit_log_num", translate("Audit Log Number"));
|
||||
o.rmempty = true;
|
||||
o.placeholder = "default";
|
||||
o:depends({enable_audit_log = "1", audit_log_output_mode = "file"});
|
||||
|
||||
o = s:taboption("custom", Value, "audit_log_file", translate("Audit Log File"))
|
||||
o.rmempty = true
|
||||
o.placeholder = "/var/log/smartdns/smartdns-audit.log"
|
||||
o:depends({enable_audit_log = "1", audit_log_output_mode = "file"});
|
||||
|
||||
-- Upstream servers
|
||||
s = m:section(TypedSection, "server", translate("Upstream Servers"), translate("Upstream Servers, support UDP, TCP protocol. " ..
|
||||
@ -561,6 +612,7 @@ s.nodescriptions = true
|
||||
s:tab("forwarding", translate('DNS Forwarding Setting'))
|
||||
s:tab("block", translate("DNS Block Setting"))
|
||||
s:tab("domain-address", translate("Domain Address"), translate("Set Specific domain ip address."))
|
||||
s:tab("ip-alias", translate('IP Alias Setting'))
|
||||
s:tab("blackip-list", translate("IP Blacklist"), translate("Set Specific ip blacklist."))
|
||||
|
||||
---- domain forwarding;
|
||||
@ -684,7 +736,7 @@ function o.write(self, section, value)
|
||||
end
|
||||
|
||||
-- Doman addresss
|
||||
addr = s:taboption("domain-address", Value, "address",
|
||||
addr = s:taboption("domain-address", Value, "dummy_address",
|
||||
translate(""),
|
||||
translate("Specify an IP address to return for any host in the given domains, Queries in the domains are never forwarded and always replied to with the specified IP address which may be IPv4 or IPv6."))
|
||||
|
||||
@ -700,10 +752,71 @@ function addr.write(self, section, value)
|
||||
nixio.fs.writefile("/etc/smartdns/address.conf", value)
|
||||
end
|
||||
|
||||
---- ip rules;
|
||||
s = m:section(TypedSection, "ip-rule", translate("IP Rules"), translate("IP Rules Settings"))
|
||||
s.anonymous = true
|
||||
s.nodescriptions = true
|
||||
|
||||
s:tab("ip-alias", translate('IP Alias Setting'))
|
||||
s:tab("blackip-list", translate("IP Blacklist"), translate("Set Specific ip blacklist."))
|
||||
|
||||
-- enable flag;
|
||||
o = s:taboption("ip-alias", Flag, "enabled", translate("Enable"), translate("Enable"));
|
||||
o.rmempty = false;
|
||||
o.default = o.enabled;
|
||||
o.editable = true;
|
||||
|
||||
-- name;
|
||||
o = s:taboption("ip-alias", Value, "name", translate("IP Rule Name"), translate("IP Rule Name"));
|
||||
o.rmempty = true;
|
||||
o.datatype = "string";
|
||||
|
||||
o = s:taboption("ip-alias", FileUpload, "ip_set_file", translate("IP Set File"), translate("Upload IP set file."));
|
||||
o.rmempty = true
|
||||
o.datatype = "file"
|
||||
o.modalonly = true;
|
||||
o.root_directory = "/etc/smartdns/ip-set"
|
||||
|
||||
o = s:taboption("ip-alias", DynamicList, "ip_addr", translate("IP Addresses"), translate("IP addresses, CIDR format."));
|
||||
o.rmempty = true;
|
||||
o.datatype = "ipaddr"
|
||||
o.modalonly = true;
|
||||
|
||||
o = s:taboption("ip-alias", Flag, "whitelist_ip", translate("Whitelist IP"), translate("Whitelist IP Rule, Accept IP addresses within the range."));
|
||||
o.rmempty = true;
|
||||
o.default = o.disabled;
|
||||
o.modalonly = true;
|
||||
|
||||
o = s:taboption("ip-alias", Flag, "blacklist_ip", translate("Blacklist IP"), translate("Blacklist IP Rule, Decline IP addresses within the range."));
|
||||
o.rmempty = true;
|
||||
o.default = o.disabled;
|
||||
o.modalonly = true;
|
||||
|
||||
o = s:taboption("ip-alias", Flag, "ignore_ip", translate("Ignore IP"), translate("Do not use these IP addresses."));
|
||||
o.rmempty = true;
|
||||
o.default = o.disabled;
|
||||
o.modalonly = true;
|
||||
|
||||
o = s:taboption("ip-alias", Flag, "bogus_nxdomain", translate("Bogus nxdomain"), translate("Return SOA when the requested result contains a specified IP address."));
|
||||
o.rmempty = true;
|
||||
o.default = o.disabled;
|
||||
o.modalonly = true;
|
||||
|
||||
o = s:taboption("ip-alias", DynamicList, "ip_alias", translate("IP alias"), translate("IP Address Mapping, Can be used for CDN acceleration with Anycast IP, such as Cloudflare's CDN."));
|
||||
o.rmempty = true;
|
||||
o.datatype = 'ipaddr("nomask")';
|
||||
o.modalonly = true;
|
||||
|
||||
-- other args
|
||||
o = s:taboption("ip-alias", Value, "addition_flag", translate("Additional Rule Flag"), translate("Additional Flags for rules, read help on ip-rule for more information."))
|
||||
o.default = ""
|
||||
o.rempty = true
|
||||
o.modalonly = true;
|
||||
|
||||
-- IP Blacklist
|
||||
addr = s:taboption("blackip-list", Value, "blacklist_ip",
|
||||
translate(""),
|
||||
translate("Configure IP blacklists that will be filtered from the results of specific DNS server."))
|
||||
addr = s:taboption("blackip-list", Value, "dummy_blacklist_ip",
|
||||
translate(""),
|
||||
translate("Configure IP blacklists that will be filtered from the results of specific DNS server."))
|
||||
|
||||
addr.template = "cbi/tvalue"
|
||||
addr.rows = 20
|
||||
@ -713,7 +826,7 @@ function addr.cfgvalue(self, section)
|
||||
end
|
||||
|
||||
function addr.write(self, section, value)
|
||||
value = value:gsub("\r\n?", "\n")
|
||||
-- value = value:gsub("\r\n?", "\n")
|
||||
nixio.fs.writefile("/etc/smartdns/blacklist-ip.conf", value)
|
||||
end
|
||||
|
||||
@ -845,4 +958,3 @@ o.write = function()
|
||||
end
|
||||
|
||||
return m
|
||||
|
||||
|
@ -6,6 +6,10 @@ msgid ""
|
||||
"Additional Flags for rules, read help on domain-rule for more information."
|
||||
msgstr "额外的规则标识,具体参考domain-rule的帮助说明。"
|
||||
|
||||
msgid ""
|
||||
"Additional Flags for rules, read help on ip-rule for more information."
|
||||
msgstr "额外的规则标识,具体参考ip-rule的帮助说明。"
|
||||
|
||||
msgid "Additional Rule Flag"
|
||||
msgstr "额外规则标识"
|
||||
|
||||
@ -18,6 +22,18 @@ msgstr "额外的服务器参数,参考bind选项的帮助说明。"
|
||||
msgid "Advanced Settings"
|
||||
msgstr "高级设置"
|
||||
|
||||
msgid "Audit Log Output Mode"
|
||||
msgstr "审计日志输出模式"
|
||||
|
||||
msgid "Audit Log Size"
|
||||
msgstr "审计日志大小"
|
||||
|
||||
msgid "Audit Log Number"
|
||||
msgstr "审计日志数量"
|
||||
|
||||
msgid "Audit Log File"
|
||||
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."
|
||||
@ -35,6 +51,15 @@ msgstr "绑定到设备"
|
||||
msgid "Bind Device Name"
|
||||
msgstr "绑定的设备名称"
|
||||
|
||||
msgid "Bogus nxdomain"
|
||||
msgstr "假冒IP"
|
||||
|
||||
msgid "Blacklist IP"
|
||||
msgstr "黑名单"
|
||||
|
||||
msgid "Blacklist IP Rule, Decline IP addresses within the range."
|
||||
msgstr "黑名单规则,拒绝指定范围的IP地址。"
|
||||
|
||||
msgid "Block domain"
|
||||
msgstr "屏蔽域名"
|
||||
|
||||
@ -67,6 +92,9 @@ msgstr "配置分流域名列表"
|
||||
msgid "Custom Settings"
|
||||
msgstr "自定义设置"
|
||||
|
||||
msgid "Do not use these IP addresses."
|
||||
msgstr "忽略这些IP地址"
|
||||
|
||||
msgid "DOH Server"
|
||||
msgstr "DOH服务器"
|
||||
|
||||
@ -235,6 +263,9 @@ msgstr "每周日"
|
||||
msgid "Update Time (Every Day)"
|
||||
msgstr "更新时间(每天)"
|
||||
|
||||
msgid "Enable Audit Log"
|
||||
msgstr "启用审计日志"
|
||||
|
||||
msgid "Enable domain prefetch, accelerate domain response speed."
|
||||
msgstr "启用域名预加载,加速域名响应速度。"
|
||||
|
||||
@ -250,6 +281,9 @@ msgstr "从default默认服务器组中排除。"
|
||||
msgid "Exclude Default Group"
|
||||
msgstr "从默认组中排除"
|
||||
|
||||
msgid "file"
|
||||
msgstr "文件"
|
||||
|
||||
msgid "Fastest IP"
|
||||
msgstr "最快IP"
|
||||
|
||||
@ -298,12 +332,42 @@ msgstr "授予访问 LuCI 应用 smartdns 的权限"
|
||||
msgid "HTTP Host"
|
||||
msgstr "HTTP主机"
|
||||
|
||||
msgid "IP alias"
|
||||
msgstr "IP别名"
|
||||
|
||||
msgid "IP Alias Setting"
|
||||
msgstr "IP别名设置"
|
||||
|
||||
msgid "IP Blacklist"
|
||||
msgstr "IP黑名单"
|
||||
|
||||
msgid "IP Blacklist Filtering"
|
||||
msgstr "IP黑名单过滤"
|
||||
|
||||
msgid "IP Addresses"
|
||||
msgstr "IP地址"
|
||||
|
||||
msgid "IP Address Mapping, Can be used for CDN acceleration with Anycast IP, such as Cloudflare's CDN."
|
||||
msgstr "IP地址映射,可用于支持AnyCast IP的CDN加速,比如Cloudflare的CDN。"
|
||||
|
||||
msgid "Ignore IP"
|
||||
msgstr "忽略IP"
|
||||
|
||||
msgid "IP Rules"
|
||||
msgstr "IP规则"
|
||||
|
||||
msgid "IP Rules Settings"
|
||||
msgstr "IP规则设置"
|
||||
|
||||
msgid "IP Rule Name"
|
||||
msgstr "IP规则名称"
|
||||
|
||||
msgid "IP Set File"
|
||||
msgstr "IP集合列表文件"
|
||||
|
||||
msgid "IP addresses, CIDR format."
|
||||
msgstr "IP地址,CIDR格式。"
|
||||
|
||||
msgid "IPV6 Server"
|
||||
msgstr "IPV6服务器"
|
||||
|
||||
@ -338,6 +402,9 @@ msgstr "监听在指定的设备上,避免非本地网络的DNS查询请求。
|
||||
msgid "Local Port"
|
||||
msgstr "本地端口"
|
||||
|
||||
msgid "Log Output Mode"
|
||||
msgstr "日志输出模式"
|
||||
|
||||
msgid "Log Size"
|
||||
msgstr "日志大小"
|
||||
|
||||
@ -350,6 +417,9 @@ msgstr "日志数量"
|
||||
msgid "Log File"
|
||||
msgstr "日志文件路径"
|
||||
|
||||
msgid "mDNS Lookup"
|
||||
msgstr "mDNS查询"
|
||||
|
||||
msgid "Marking Packets"
|
||||
msgstr "数据包标记"
|
||||
|
||||
@ -428,12 +498,18 @@ msgstr "设置返回给客户端的域名TTL最大值。"
|
||||
msgid "Report bugs"
|
||||
msgstr "报告BUG"
|
||||
|
||||
msgid "Return SOA when the requested result contains a specified IP address."
|
||||
msgstr "当结果包含对应范围的IP时,返回SOA。"
|
||||
|
||||
msgid "Resolve Local Hostnames"
|
||||
msgstr "解析本地主机名"
|
||||
|
||||
msgid "Resolve local hostnames by reading Dnsmasq lease file."
|
||||
msgstr "读取Dnsmasq的租约文件解析本地主机名。"
|
||||
|
||||
msgid "Resolve local network hostname via mDNS protocol."
|
||||
msgstr "使用mDNS协议解析本地网络主机名。"
|
||||
|
||||
msgid "Response Mode"
|
||||
msgstr "响应模式"
|
||||
|
||||
@ -443,6 +519,9 @@ msgstr "重启"
|
||||
msgid "Restart Service"
|
||||
msgstr "重启服务"
|
||||
|
||||
msgid "syslog"
|
||||
msgstr "系统日志"
|
||||
|
||||
msgid "Second Server Settings"
|
||||
msgstr "第二DNS服务器"
|
||||
|
||||
@ -517,6 +596,9 @@ msgstr "跳过双栈优选"
|
||||
msgid "Skip Dualstack Selection."
|
||||
msgstr "跳过双栈优选。"
|
||||
|
||||
msgid "Skip IP Alias"
|
||||
msgstr "跳过IP别名"
|
||||
|
||||
msgid "Skip Ipset Rule"
|
||||
msgstr "跳过ipset规则"
|
||||
|
||||
@ -647,6 +729,9 @@ msgstr "上传域名列表文件,或在下载文件设置页面设置自动下
|
||||
msgid "Upload domain list file."
|
||||
msgstr "上传域名列表文件"
|
||||
|
||||
msgid "Upload IP set file."
|
||||
msgstr "上传IP集合列表文件。"
|
||||
|
||||
msgid "Upload smartdns config file to /etc/smartdns/conf.d"
|
||||
msgstr "上传配置文件到/etc/smartdns/conf.d"
|
||||
|
||||
@ -677,6 +762,12 @@ msgstr ""
|
||||
"用于校验 TLS 服务器的有效性,数值为 Base64 编码的 SPKI 指纹,留空表示不验证 "
|
||||
"TLS 的合法性。"
|
||||
|
||||
msgid "Whitelist IP"
|
||||
msgstr "白名单"
|
||||
|
||||
msgid "Whitelist IP Rule, Accept IP addresses within the range."
|
||||
msgstr "白名单规则,接受指定范围的IP地址。"
|
||||
|
||||
msgid "Write cache to disk on exit and load on startup."
|
||||
msgstr "退出时保存cache到磁盘,启动时加载。"
|
||||
|
||||
@ -720,4 +811,4 @@ msgid "type"
|
||||
msgstr "类型"
|
||||
|
||||
msgid "udp"
|
||||
msgstr "udp"
|
||||
msgstr "udp"
|
Loading…
Reference in New Issue
Block a user