Last active
May 31, 2018 18:39
-
-
Save lexrus/49d9f3cd50a16b1fa9df to your computer and use it in GitHub Desktop.
LaunchCtl plist of ChinaDNS for El Capitan.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.shadowsocks.chinadns</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/chinadns</string> | |
<string>-c</string> | |
<string>/usr/local/etc/chnroute.txt</string> | |
</array> | |
<key>KeepAlive</key> | |
<dict> | |
<key>NetworkState</key> | |
<true/> | |
</dict> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brew install chinadns-c
curl 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /usr/local/etc/chnroute.txt
/Library/LaunchDaemons
:sudo curl https://gist.githubusercontent.com/lexrus/49d9f3cd50a16b1fa9df/raw/6ee375498ec04755070df5894732e987e2e561d4/com.shadowsocks.chinadns.plist -o /Library/LaunchDaemons/com.shadowsocks.chinadns.plist
sudo launchctl load /Library/LaunchDaemons/com.shadowsocks.chinadns.plist