-
Install chinadns
pip install chinadns
-
Move the binary to /usr/sbin
sudo mv /usr/local/bin/chinadns /usr/sbin/
-
Download this plist
curl https://gist.githubusercontent.com/gythialy/77dc2c3db41d4081320d/raw/3bac5e11be125bb411f4b85ec8ce6a49c4c3ae7e/com.shadowsocks.chinadns.plist -O
sudo mv com.shadowsocks.chinadns.plist /Library/LaunchDaemons/
-
Change ownership
sudo chown root:wheel /Library/LaunchDaemons/com.shadowsocks.chinadns.plist
sudo chmod +x /Library/LaunchDaemons/com.shadowsocks.chinadns.plist
-
Launch ChinaDNS:
sudo launchctl load com.shadowsocks.chinadns.plist
-
-
Save gythialy/77dc2c3db41d4081320d 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-/Apple/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>KeepAlive</key> | |
<true/> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/chinadns</string> | |
<string>-c</string> | |
<string>/Users/gythialy/opt/chnroute.txt</string> | |
<string>-p</string> | |
<string>5300</string> | |
</array> | |
<key>UserName</key> | |
<string>root</string> | |
<key>StandardErrorPath</key> | |
<string>/dev/null</string> | |
<key>StandardOutPath</key> | |
<string>/dev/null</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment