Skip to content

Instantly share code, notes, and snippets.

@MisakaMikoto-35c5
Last active August 5, 2018 07:35
Show Gist options
  • Save MisakaMikoto-35c5/6c528c4c02facc01b6446063d121fff7 to your computer and use it in GitHub Desktop.
Save MisakaMikoto-35c5/6c528c4c02facc01b6446063d121fff7 to your computer and use it in GitHub Desktop.
#!/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
#!/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