更新 anti-AD 去广告 DNS 列表。
/usr/bin/update-hosts-blocklists
#!/bin/sh
#add to /etc/dnsmasq.conf :
# conf-dir=/etc/dnsmasq.d,*.conf
# addn-hosts=/etc/dnsmasq.d/hostnames.txt
#
#add to /etc/smartdns/custom.conf or /etc/smartdns/smartdns.conf :
# conf-file /etc/smartdns/anti-ad-smartdns.conf
#
mkdir /tmp/hosts-blocklists
cd /tmp/hosts-blocklists
#wget https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt
#wget https://raw.githubusercontent.com/notracking/hosts-blocklists/master/domains.txt
#wget https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/adblock-for-dnsmasq.conf
wget https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-smartdns.conf
cp anti-ad-smartdns.conf /etc/smartdns/
#cp adblock-for-dnsmasq.conf /etc/dnsmasq.d/
#cp hostnames.txt /etc/dnsmasq.d
#mv domains.txt /etc/dnsmasq.d/domains-block.conf
cd /tmp
rm -rf /tmp/hosts-blocklists
/etc/init.d/smartdns restart
/etc/init.d/dnsmasq restart