Last active
February 6, 2016 15:10
-
-
Save dgeibi/f77456a679e307e9e90d to your computer and use it in GitHub Desktop.
dnsmasq-china-list --> Pcap_DNSProxy WhiteList.txt
This file contains hidden or 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
| @echo off | |
| ( | |
| echo [Local Hosts] | |
| echo ## China mainland domains | |
| echo ## Sources: https://github.com/felixonmars/dnsmasq-china-list | |
| echo. | |
| ) > "WhiteList.txt" | |
| Tools\Routing_Update\bin\curl -O https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | |
| Tools\Routing_Update\bin\sed -e "s@/114.114.114.114$@@" -e "s@\.@\\\.@g" -e "s@server=/@\.*\\\b@" -e "s@bcn$@\.cn\$@" accelerated-domains.china.conf >> WhiteList.txt | |
| del accelerated-domains.china.conf | |
| :continue | |
| set/p X=Use google.china.conf? [y/n]: | |
| if /i "%X%"=="y" goto google | |
| if /i "%X%"=="n" goto default | |
| goto continue | |
| Tools\Routing_Update\bin\curl -O https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf | |
| Tools\Routing_Update\bin\sed -e "s@/114.114.114.114$@@" -e "s@\.@\\\.@g" -e "s@server=/@\.*\\\b@" google.china.conf >> WhiteList.txt | |
| del google.china.conf | |
| pause | |
| :default | |
| pause |
This file contains hidden or 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/bash | |
| curl -O https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | |
| echo -e '[Local Hosts]\n## China mainland domains\n## Sources: https://github.com/felixonmars/dnsmasq-china-list\n' > WhiteList.txt | |
| sed -e "s|/114.114.114.114$||" -e "s|\.|\\\.|g" -e "s|server=/|\.*\\\b|" -e "s|bcn$|\.cn\$|" accelerated-domains.china.conf >> WhiteList.txt | |
| read -p "Use google.china.conf?[y/n]:" yn | |
| if [ "${yn}" == "Y" ] || [ "${yn}" == "y" ]; then | |
| curl -O https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf | |
| sed -e "s|/114.114.114.114$||" -e "s|\.|\\\.|g" -e "s|server=/|\.*\\\b|" google.china.conf >> WhiteList.txt | |
| rm google.china.conf | |
| fi | |
| rm accelerated-domains.china.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment