Skip to content

Instantly share code, notes, and snippets.

@oldcai
Last active August 29, 2015 14:10
Show Gist options
  • Save oldcai/fd5d32a3a1877c22d1d4 to your computer and use it in GitHub Desktop.
Save oldcai/fd5d32a3a1877c22d1d4 to your computer and use it in GitHub Desktop.
Generate gfwlist pac file
#!/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