Last active
August 29, 2015 14:10
-
-
Save oldcai/fd5d32a3a1877c22d1d4 to your computer and use it in GitHub Desktop.
Generate gfwlist pac file
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
#!/usr/bin/env bash | |
# To use this script, you need to install gfwlist2pac, curl first | |
# install command: pip install gfwlist2pac | |
# For more information: https://github.com/clowwindy/gfwlist2pac | |
rm gfwlist.txt | |
rm gfwlist.js | |
curl --socks5-hostname 127.0.0.1:1080 http://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt > gfwlist.txt | |
gfwlist2pac -i gfwlist.txt -f gfwlist.js -p "SOCKS local.shadowsocks.com:1080; SOCKS5 local.shadowsocks.com:1080; DIRECT;" --user-rule user_rules.txt | |
echo "Success generated PAC file: "`pwd`"/gfwlist.js" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment