mirror of https://github.com/dnomd343/ClearDNS
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
740 B
27 lines
740 B
load_domestic(){
|
|
cat>/etc/smartdns/expose/domestic.conf<<EOF
|
|
server 223.5.5.5
|
|
server 223.6.6.6
|
|
server 119.29.29.29
|
|
server 119.28.28.28
|
|
server 114.114.114.114
|
|
server 114.114.115.115
|
|
EOF
|
|
}
|
|
|
|
load_foreign(){
|
|
cat>/etc/smartdns/expose/foreign.conf<<EOF
|
|
server-tls 223.5.5.5:853
|
|
server-https https://doh.pub/dns-query
|
|
EOF
|
|
}
|
|
|
|
mkdir -p /etc/smartdns/expose/
|
|
[ ! -s "/etc/smartdns/expose/domestic.conf" ] && load_domestic
|
|
[ ! -s "/etc/smartdns/expose/foreign.conf" ] && load_foreign
|
|
cat /etc/smartdns/base.conf > /etc/smartdns/config.conf
|
|
cat /etc/smartdns/expose/domestic.conf >> /etc/smartdns/config.conf
|
|
while read -r raw
|
|
do
|
|
echo "$raw -group foreign -exclude-default-group" >> /etc/smartdns/config.conf
|
|
done < /etc/smartdns/expose/foreign.conf
|
|
|