Last active
August 5, 2018 07:35
-
-
Save MisakaMikoto-35c5/6c528c4c02facc01b6446063d121fff7 to your computer and use it in GitHub Desktop.
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 | |
DNS=114.114.115.115 | |
wget -O /etc/dnsmasq.d/accelerated-domains.china.conf --no-check-certificate \ | |
https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | |
wget -O /etc/dnsmasq.d/apple.china.conf --no-check-certificate \ | |
https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf | |
wget -O /etc/dnsmasq.d/google.china.conf --no-check-certificate \ | |
https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf | |
wget -O /etc/dnsmasq.d/bogus-nxdomain.china.conf --no-check-certificate \ | |
https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf | |
sed -i "s|^\(server.*\)/[^/]*$|\1/$DNS|" /etc/dnsmasq.d/accelerated-domains.china.conf | |
sed -i "s|^\(server.*\)/[^/]*$|\1/$DNS|" /etc/dnsmasq.d/google.china.conf | |
sed -i "s|^\(server.*\)/[^/]*$|\1/$DNS|" /etc/dnsmasq.d/apple.china.conf | |
/etc/init.d/dnsmasq restart |
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 | |
opkg install wget openssl-util | |
# opkg install ca-bundle ca-certificates | |
mkdir -p /etc/dnsmasq.d | |
echo -e '\n\nconf-dir=/etc/dnsmasq.d\n' >> /etc/dnsmasq.conf | |
echo -e '\n\n/etc/dnsmasq.d\n' >> /etc/sysupgrade.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment