Skip to content

自用配置文件备份

PikuZheng edited this page Oct 1, 2022 · 3 revisions

/etc/periodic/daily/10-smartdns

#!/bin/sh
curl https://raw.githubusercontent.com/neodevpro/neodevhost/master/lite_smartdns.conf -o /userdata/smartdns/anti-ad-for-smartdns.conf
curl https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt -o /userdata/smartdns/geoip.txt
docker restart smartdns36

/userdata/smartdns/smartdns.conf

server-name photon-machine
bind [::]:53
bind-tcp [::]:53

prefetch-domain yes
dualstack-ip-selection no

cache-size 8000

rr-ttl-min 1
rr-ttl-max 3600
rr-ttl-reply-max 3600

conf-file /etc/smartdns/address.conf
conf-file /etc/smartdns/blacklist-ip.conf
conf-file /etc/smartdns/custom.conf

/userdata/smartdns/address.conf

conf-file /etc/smartdns/anti-ad-for-smartdns.conf

#20220908 new config: domain-set
domain-set -name mainland -type list -file /etc/smartdns/mainland.txt
domain-set -name geoip -type list -file /etc/smartdns/geoip.txt
domain-set -name google -type list -file /etc/smartdns/google.txt
domain-set -name outbound -type list -file /etc/smartdns/outbound.txt

domain-rules /.cn/ -speed-check-mode ping -nameserver mainland
domain-rules /domain-set:mainland/ -speed-check-mode ping -nameserver mainland
domain-rules /domain-set:geoip/ -speed-check-mode none -nameserver outbound -address #6
domain-rules /domain-set:google/ -speed-check-mode none -nameserver outbound -address #6
domain-rules /domain-set:outbound/ -speed-check-mode none -nameserver outbound -address #6

/userdata/smartdns/blacklist-ip.conf

#天津腾讯 ping丢包严重
blacklist-ip 182.254.52.0/23

#AS24424 google china
blacklist-ip 203.208.32.0/19
blacklist-ip 113.197.104.0/23

#google gvt1.com sichuan mobile
blacklist-ip  36.170.32.0/19

#https://github.com/pymumu/smartdns/issues/219
blacklist-ip 4.36.66.178
.....以下省略

/userdata/smartdns/custom.conf

#log-level debug
log-level info
log-size 1M
log-num 5
log-file /etc/smartdns/log/smartdns.log

cache-file /etc/smartdns/smartdns.cache

max-reply-ip-num 30
#dnsmasq-lease-file /etc/smartdns/dnsmasq.leases
edns-client-subnet 103.***.***.0/24

# 20220217 add new param
force-qtype-SOA 65

speed-check-mode none

# 20220329 add new param
# 20220718 not supported anymore
#response-mode whole-response
response-mode fastest-ip

conf-file /etc/smartdns/server-list.conf

/userdata/smartdns/server-list.conf

#service myself
server-tls 103.***.***.***  -tls-host-verify ************* -group outbound -exclude-default-group -no-check-certificate -check-edns
server-tls 45.***.***.*** -tls-host-verify ************* -group outbound -exclude-default-group -no-check-certificate -check-edns

#outbound backup
#server-tls dns-unfiltered.adguard.com -group outbound -blacklist-ip -exclude-default-group -check-edns
#server-https https://public.dns.iij.jp/dns-query -group outbound -blacklist-ip -exclude-default-group -check-edns

#mainland dnspub
server-tls 1.12.12.12 -group mainland -blacklist-ip
server-tls 120.53.53.53  -group mainland -blacklist-ip

#mainland dnspub beijing
server-https https://120.53.80.136/dns-query -http-host doh.pub -group mainland -blacklist-ip
server-https https://162.14.21.178/dns-query -http-host doh.pub -group mainland -blacklist-ip

google.txt