Created
December 21, 2014 16:41
-
-
Save int64ago/296abee12b6d64832728 to your computer and use it in GitHub Desktop.
dnsmasq update for China
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cnlist() { | |
wget -4 --no-check-certificate -O /etc/dnsmasq.d/accelerated-domains.china.conf https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | |
wget -4 --no-check-certificate -O /etc/dnsmasq.d/bogus-nxdomain.china.conf https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf | |
} | |
adblock() { | |
wget -4 --no-check-certificate -O - https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt | | |
grep ^\|\|[^\*]*\^$ | | |
sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' | uniq > /etc/dnsmasq.d/adblock.conf | |
wget -4 --no-check-certificate -O - https://raw.githubusercontent.com/kcschan/AdditionalAdblock/master/list.txt | | |
grep ^\|\|[^\*]*\^$ | | |
sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' >> /etc/dnsmasq.d/adblock.conf | |
} | |
hosts(){ | |
wget -4 --no-check-certificate -O /etc/hosts https://raw.githubusercontent.com/zxdrive/imouto.host/master/imouto.host.txt | |
} | |
cnlist | |
adblock | |
hosts | |
#systemctl restart dnsmasq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment