Browse Source

Update LuCI configration

Nick Peng 7 years ago
parent
commit
8ff338852e

+ 4 - 4
ReadMe.md

@@ -89,7 +89,7 @@ From the comparison, smartdns found the fastest IP address to visit www.baidu.co
    Support standard Linux system (Raspberry Pi), openwrt system various firmware, ASUS router native firmware.
 
 7. **Support IPV4, IPV6 dual stack**  
-   Support IPV4, IPV6 network, support query A, AAAA record.
+   Support IPV4, IPV6 network, support query A, AAAA record, dual-stack IP selection.
 
 8. **High performance, low resource consumption**  
    Multi-threaded asynchronous IO mode, cache cache query results.
@@ -388,9 +388,9 @@ Note: Merlin firmware is derived from ASUS firmware and can theoretically be use
 |audit-size|audit log size|128K|number+K,M,G|audit-size 128K
 |audit-num|archived audit log number|2|Integer|audit-num 2
 |conf-file|additional conf file|None|File path|conf-file /etc/smartdns/smartdns.more.conf
-|server|Upstream UDP DNS server|None|[ip][:port] [-blacklist-ip], Repeatable, blacklist-ip parameter represents filtering the result of IPs with blacklist-ip configuration.| server 8.8.8.8:53
-|server-tcp|Upstream TCP DNS server|None|[IP][:port] [-blacklist-ip], Repeatable, blacklist-ip parameter represents filtering the result of IPs with blacklist-ip configuration.| server-tcp 8.8.8.8:53
-|server-tls|Upstream TLS DNS server|None|[IP][:port] [-blacklist-ip], Repeatable, blacklist-ip parameter represents filtering the result of IPs with blacklist-ip configuration.| server-tls 8.8.8.8:853
+|server|Upstream UDP DNS server|None|[ip][:port] [-blacklist-ip][-check-edns], Repeatable, blacklist-ip parameter represents filtering the result of IPs with blacklist-ip configuration.| server 8.8.8.8:53 -blacklist-ip -check-edns
+|server-tcp|Upstream TCP DNS server|None|[IP][:port] [-blacklist-ip][-check-edns], Repeatable, blacklist-ip parameter represents filtering the result of IPs with blacklist-ip configuration.| server-tcp 8.8.8.8:53
+|server-tls|Upstream TLS DNS server|None|[IP][:port] [-blacklist-ip][-check-edns], Repeatable, blacklist-ip parameter represents filtering the result of IPs with blacklist-ip configuration.| server-tls 8.8.8.8:853
 |address|Domain IP address|None|address /domain/ip| address /www.example.com/1.2.3.4
 |ipset|Domain IPSet|None|ipset /domain/ipset|ipset /www.example.com/pass
 |bogus-nxdomain|bogus IP address|None|[IP/subnet], Repeatable| bogus-nxdomain 1.2.3.4/16

+ 4 - 4
ReadMe_zh-CN.md

@@ -89,7 +89,7 @@ rtt min/avg/max/mdev = 5.954/6.133/6.313/0.195 ms
    支持标准Linux系统(树莓派),openwrt系统各种固件,华硕路由器原生固件。
 
 7. **支持IPV4, IPV6双栈**  
-   支持IPV4,IPV6网络,支持查询A, AAAA记录。
+   支持IPV4,IPV6网络,支持查询A, AAAA记录,支持双栈IP速度优化
 
 8. **高性能,占用资源少**  
    多线程异步IO模式,cache缓存查询结果。
@@ -388,9 +388,9 @@ rtt min/avg/max/mdev = 5.954/6.133/6.313/0.195 ms
 |audit-size|审计大小|128K|数字+K,M,G|audit-size 128K
 |audit-num|审计归档个数|2|数字|audit-num 2
 |conf-file|附加配置文件|无|文件路径|conf-file /etc/smartdns/smartdns.more.conf
-|server|上游UDP DNS|无|[ip][:port] [-blacklist-ip],可重复,blacklist-ip参数指定使用blacklist-ip配置IP过滤结果| server 8.8.8.8:53 -blacklist-ip
-|server-tcp|上游TCP DNS|无|[IP][:port] [-blacklist-ip],可重复,blacklist-ip参数指定使用blacklist-ip配置IP过滤结果| server-tcp 8.8.8.8:53
-|server-tls|上游TLS DNS|无|[IP][:port] [-blacklist-ip],可重复,blacklist-ip参数指定使用blacklist-ip配置IP过滤结果| server-tls 8.8.8.8:853
+|server|上游UDP DNS|无|[ip][:port] [-blacklist-ip][-check-edns],可重复,blacklist-ip参数指定使用blacklist-ip配置IP过滤结果| server 8.8.8.8:53 -blacklist-ip -check-edns
+|server-tcp|上游TCP DNS|无|[IP][:port] [-blacklist-ip][-check-edns],可重复,blacklist-ip参数指定使用blacklist-ip配置IP过滤结果| server-tcp 8.8.8.8:53
+|server-tls|上游TLS DNS|无|[IP][:port] [-blacklist-ip][-check-edns],可重复,blacklist-ip参数指定使用blacklist-ip配置IP过滤结果| server-tls 8.8.8.8:853
 |address|指定域名IP地址|无|address /domain/ip| address /www.example.com/1.2.3.4
 |ipset|域名IPSET|None|ipset /domain/ipset|ipset /www.example.com/pass
 |bogus-nxdomain|假冒IP地址过滤|无|[ip/subnet],可重复| bogus-nxdomain 1.2.3.4/16

+ 2 - 3
etc/smartdns/smartdns.conf

@@ -76,15 +76,14 @@ log-level info
 # audit-num 2
 
 # remote udp dns server list
-# server [IP]:[PORT] [-blacklist-ip] [-check-edns] [-check-ttl=[ttl]]
+# server [IP]:[PORT] [-blacklist-ip] [-check-edns]
 # default port is 53
 #   -blacklist-ip: filter result with blacklist ip
 #   -check-edns: result must exist edns RR, or discard result.
-#   -check-ttl: Check whether the TTL of result is equal, If not equal, discard the result, -check-ttl=0 for auto check TTL.
 # server 8.8.8.8 -blacklist-ip -check-edns
 
 # remote tcp dns server list
-# server-tcp [IP]:[PORT] [-blacklist-ip] [-check-edns] 
+# server-tcp [IP]:[PORT] [-blacklist-ip]
 # default port is 53
 # server-tcp 8.8.8.8
 

+ 10 - 1
package/luci/files/luci/i18n/smartdns.zh-cn.po

@@ -106,7 +106,7 @@ msgstr "上游服务器"
 msgid "Upstream Servers, support UDP, TCP protocol. Please configure multiple DNS servers, including multiple foreign DNS servers."
 msgstr "上游DNS服务器列表,支持UDP,TCP协议,请配置多个上游DNS服务器,包括多个国内外服务器"
 
-msgid "DNS Server name"
+msgid "DNS Server Name"
 msgstr "DNS服务器名称"
 
 msgid "port"
@@ -130,6 +130,12 @@ msgstr "域名地址"
 msgid "IP Blacklist Filtering"
 msgstr "IP黑名单过滤"
 
+msgid "Anti Answer Forgery"
+msgstr "反回答伪造"
+
+msgid "anti answer forgery, if DNS does not work properly after enabling, please turn off this feature"
+msgstr "反回答伪造,如果启用后DNS工作不正常,请关闭此功能。"
+
 msgid "Filtering IP with blacklist"
 msgstr "使用IP黑名单过滤"
 
@@ -154,6 +160,9 @@ msgstr "配置需要从指定域名服务器结果过滤的IP黑名单。"
 msgid "Technical Support"
 msgstr "技术支持"
 
+msgid "If you like this software, please buy me a cup of coffee."
+msgstr "如果本软件对你有帮助,请给作者加个蛋。"
+
 msgid "SmartDNS official website"
 msgstr "SmartDNS官方网站"
 

+ 2 - 2
package/luci/files/luci/model/cbi/smartdns/smartdns.lua

@@ -121,7 +121,7 @@ o.cfgvalue    = function(...)
 end
 
 ---- name
-s:option(Value, "name", translate("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("ip"), translate("DNS Server ip"))
 o.datatype = "ipaddr"
@@ -187,7 +187,7 @@ end
 
 -- Doman addresss
 s = m:section(TypedSection, "smartdns", translate("Technical Support"), 
-	translate("Technical Support"))
+	translate("If you like this software, please buy me a cup of coffee."))
 s.anonymous = true
 
 o = s:option(Button, "web")

+ 8 - 0
package/luci/files/luci/model/cbi/smartdns/upstream.lua

@@ -21,4 +21,12 @@ o.cfgvalue    = function(...)
     return Flag.cfgvalue(...) or "0"
 end
 
+---- anti-Answer-Forgery
+o = s:option(Flag, "check_edns", translate("Anti Answer Forgery"), translate("anti answer forgery, if DNS does not work properly after enabling, please turn off this feature"))
+o.rmempty     = false
+o.default     = o.disabled
+o.cfgvalue    = function(...)
+    return Flag.cfgvalue(...) or "0"
+end
+
 return m

+ 5 - 0
package/openwrt/files/etc/init.d/smartdns

@@ -118,6 +118,7 @@ load_server()
 	config_get "type" "$section" "type" "udp"
 	config_get "ip" "$section" "ip" ""
 	config_get "blacklist_ip" "$section" "blacklist_ip" "0"
+	config_get "check_edns" "$section" "check_edns" "0"
 
 	if [ "$enabled" = "0" ]; then
 		return
@@ -144,6 +145,10 @@ load_server()
 		ADDITIONAL_ARGS="$ADDITIONAL_ARGS -blacklist-ip"
 	fi
 
+	if [ "$check_edns" != "0" ]; then
+		ADDITIONAL_ARGS="$ADDITIONAL_ARGS -check-edns"
+	fi
+
 	conf_append "$SERVER" "$ip:$port $ADDITIONAL_ARGS"
 }