smartdns: fix bug
This commit is contained in:
parent
90157afd29
commit
753cdd1bbf
@ -44,7 +44,7 @@ ifeq ($(ARCH),mips)
|
||||
$(INSTALL_BIN) ./files/usr/sbin/mips $(1)/usr/sbin/smartdns
|
||||
endif
|
||||
ifeq ($(ARCH),mipsel)
|
||||
$(INSTALL_BIN) ./files/usr/sbin/mips $(1)/usr/sbin/smartdns
|
||||
$(INSTALL_BIN) ./files/usr/sbin/mipsel $(1)/usr/sbin/smartdns
|
||||
endif
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/etc/config/smartdns $(1)/etc/config/smartdns
|
||||
@ -52,6 +52,8 @@ endif
|
||||
$(INSTALL_BIN) ./files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
|
||||
$(INSTALL_DIR) $(1)/etc/smartdns
|
||||
$(INSTALL_CONF) ./files/etc/smartdns/address.conf $(1)/etc/smartdns/address.conf
|
||||
$(INSTALL_CONF) ./files/etc/smartdns/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
|
||||
$(INSTALL_CONF) ./files/etc/smartdns/custom.conf $(1)/etc/smartdns/custom.conf
|
||||
$(INSTALL_CONF) ./files/etc/smartdns/smartdns.conf $(1)/etc/smartdns/smartdns.conf
|
||||
endef
|
||||
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
# Add domains which you want to force to an IP address here.
|
||||
# The example below send any host in example.com to a local webserver.
|
||||
#address /example.com/127.0.0.1
|
||||
# address /domain/[ip|-|-4|-6|#|#4|#6]
|
||||
# address /www.example.com/1.2.3.4, return ip 1.2.3.4 to client
|
||||
# address /www.example.com/-, ignore address, query from upstream, suffix 4, for ipv4, 6 for ipv6, none for all
|
||||
# address /www.example.com/#, return SOA to client, suffix 4, for ipv4, 6 for ipv6, none for all
|
||||
|
||||
# specific ipset to domain
|
||||
# ipset /domain/[ipset|-]
|
||||
# ipset /www.example.com/block, set ipset with ipset name of block
|
||||
# ipset /www.example.com/-, ignore this domain
|
||||
|
||||
# specific nameserver to domain
|
||||
# nameserver /domain/[group|-]
|
||||
# nameserver /www.example.com/office, Set the domain name to use the appropriate server group.
|
||||
# nameserver /www.example.com/-, ignore this domain
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
# Add IP blacklist which you want to filtering from some DNS server here.
|
||||
# The example below filtering ip from the result of DNS server which is configured with -blacklist-ip.
|
||||
# blacklist-ip [ip/subnet]
|
||||
# blacklist-ip 254.0.0.1/16
|
||||
14
package/jsda/smartdns/files/etc/smartdns/custom.conf
Normal file
14
package/jsda/smartdns/files/etc/smartdns/custom.conf
Normal file
@ -0,0 +1,14 @@
|
||||
# Add custom settings here.
|
||||
|
||||
# set log level
|
||||
# log-level [level], level=fatal, error, warn, notice, info, debug
|
||||
# log-level error
|
||||
|
||||
# log-size k,m,g
|
||||
# log-size 128k
|
||||
|
||||
# log-file /var/log/smartdns.log
|
||||
# log-num 2
|
||||
|
||||
# List of hosts that supply bogus NX domain results
|
||||
# bogus-nxdomain [ip/subnet]
|
||||
@ -4,19 +4,57 @@
|
||||
# server-name smartdns
|
||||
#
|
||||
|
||||
# Include another configuration options
|
||||
# conf-file [file]
|
||||
# conf-file blacklist-ip.conf
|
||||
|
||||
# dns server bind ip and port, default dns server port is 53.
|
||||
# bind [IP]:port,
|
||||
# bind [IP]:port, udp server
|
||||
# bind-tcp [IP]:port, tcp server
|
||||
# example:
|
||||
# IPV4: :53
|
||||
# IPV6 [::]:53
|
||||
# bind-tcp [::]:53
|
||||
|
||||
bind [::]:5353
|
||||
bind [::]:6053
|
||||
|
||||
# tcp connection idle timeout
|
||||
# tcp-idle-time [second]
|
||||
|
||||
# dns cache size
|
||||
# cache-size [number]
|
||||
# 0: for no cache
|
||||
cache-size 512
|
||||
|
||||
# prefetch domain
|
||||
# prefetch-domain [yes|no]
|
||||
# prefetch-domain yes
|
||||
|
||||
# List of hosts that supply bogus NX domain results
|
||||
# bogus-nxdomain [ip/subnet]
|
||||
|
||||
# List of IPs that will be filtered when nameserver is configured -blacklist-ip parameter
|
||||
# blacklist-ip [ip/subnet]
|
||||
|
||||
# List of IPs that will be accepted when nameserver is configured -whitelist-ip parameter
|
||||
# whitelist-ip [ip/subnet]
|
||||
|
||||
# List of IPs that will be ignored
|
||||
# ignore-ip [ip/subnet]
|
||||
|
||||
# force AAAA query return SOA
|
||||
# force-AAAA-SOA [yes|no]
|
||||
|
||||
# Enable IPV4, IPV6 dual stack IP optimization selection strategy
|
||||
# dualstack-ip-selection-threshold [num] (0~1000)
|
||||
# dualstack-ip-selection [yes|no]
|
||||
# dualstack-ip-selection yes
|
||||
|
||||
# edns client subnet
|
||||
# edns-client-subnet [ip/subnet]
|
||||
# edns-client-subnet 192.168.1.1/24
|
||||
# edns-client-subnet [8::8]/56
|
||||
|
||||
# ttl for all resource record
|
||||
# rr-ttl: ttl for all record
|
||||
# rr-ttl-min: minimum ttl for resource record
|
||||
@ -27,36 +65,68 @@ cache-size 512
|
||||
# rr-ttl-max 86400
|
||||
|
||||
# set log level
|
||||
# log-level [level], level=error, warn, info, debug
|
||||
# log-size k,m,g
|
||||
log-level error
|
||||
# log-level: [level], level=fatal, error, warn, notice, info, debug
|
||||
# log-file: file path of log file.
|
||||
# log-size: size of each log file, support k,m,g
|
||||
# log-num: number of logs
|
||||
log-level info
|
||||
# log-file /var/log/smartdns.log
|
||||
# log-size 128k
|
||||
# log-num 2
|
||||
|
||||
# dns audit
|
||||
# audit-enable: enable or disable audit [yes|no]
|
||||
# audit-enable yes
|
||||
# audit-size size of each audit file, support k,m,g
|
||||
# audit-file /var/log/smartdns-audit.log
|
||||
# audit-size 128k
|
||||
# audit-num 2
|
||||
|
||||
# remote udp dns server list
|
||||
# server [IP]:[PORT], default port is 53
|
||||
|
||||
#qinghua TUNA DNS666
|
||||
server 101.6.6.6
|
||||
|
||||
# 114
|
||||
server 114.114.114.114
|
||||
|
||||
#dnspod
|
||||
server 119.29.29.29
|
||||
|
||||
# alibaba dns
|
||||
server 223.5.5.5
|
||||
|
||||
#LUG
|
||||
server 202.141.178.13:5353
|
||||
server 202.141.162.123:53
|
||||
# server [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-check-edns] [-group [group] ...] [-exclude-default-group]
|
||||
# default port is 53
|
||||
# -blacklist-ip: filter result with blacklist ip
|
||||
# -whitelist-ip: filter result whth whitelist ip, result in whitelist-ip will be accepted.
|
||||
# -check-edns: result must exist edns RR, or discard result.
|
||||
# -group [group]: set server to group, use with nameserver /domain/group.
|
||||
# -exclude-default-group: exclude this server from default group.
|
||||
# server 8.8.8.8 -blacklist-ip -check-edns -group g1 -group g2
|
||||
|
||||
# remote tcp dns server list
|
||||
# server-tcp [IP]:[PORT], default port is 53
|
||||
# server-tcp 114.114.114.114
|
||||
# server-tcp [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-group [group] ...] [-exclude-default-group]
|
||||
# default port is 53
|
||||
# server-tcp 8.8.8.8
|
||||
|
||||
# remote tls dns server list
|
||||
# server-tls [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group]
|
||||
# -spki-pin: TLS spki pin to verify.
|
||||
# Get SPKI with this command:
|
||||
# echo | openssl s_client -connect '[ip]:853' | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
|
||||
# default port is 853
|
||||
# server-tls 8.8.8.8
|
||||
# server-tls 1.0.0.1
|
||||
|
||||
# remote https dns server list
|
||||
# server-https https://[host]:[port]/path [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group]
|
||||
# -spki-pin: TLS spki pin to verify.
|
||||
# default port is 443
|
||||
# server-https https://cloudflare-dns.com/dns-query
|
||||
|
||||
# specific nameserver to domain
|
||||
# nameserver /domain/[group|-]
|
||||
# nameserver /www.example.com/office, Set the domain name to use the appropriate server group.
|
||||
# nameserver /www.example.com/-, ignore this domain
|
||||
|
||||
# specific address to domain
|
||||
# address /domain/ip
|
||||
# address /www.example.com/1.2.3.4
|
||||
# address /domain/[ip|-|-4|-6|#|#4|#6]
|
||||
# address /www.example.com/1.2.3.4, return ip 1.2.3.4 to client
|
||||
# address /www.example.com/-, ignore address, query from upstream, suffix 4, for ipv4, 6 for ipv6, none for all
|
||||
# address /www.example.com/#, return SOA to client, suffix 4, for ipv4, 6 for ipv6, none for all
|
||||
|
||||
# enable ipset timeout by ttl feature
|
||||
# ipset-timeout [yes]
|
||||
|
||||
# specific ipset to domain
|
||||
# ipset /domain/[ipset|-]
|
||||
# ipset /www.example.com/block, set ipset with ipset name of block
|
||||
# ipset /www.example.com/-, ignore this domain
|
||||
|
||||
Loading…
Reference in New Issue
Block a user