Flora PAC
A PAC(Proxy auto-config) file generator with fetched China IP range, which helps walk around GFW.
Inspired by https://github.com/fivesheep/chnroutes .
Installation
$ git clone https://github.com/usufu/Flora_Pac.git
Uasge
$ ./flora_pac -h usage: flora_pac [-h] [-x [PROXY]] [-p [PORT]] [-i [PROXY]] Generate proxy auto-config rules. optional arguments: -h, --help show this help message and exit -x [PROXY], --proxy [PROXY] Proxy Server, examples: SOCKS5 127.0.0.1:8964; SOCKS 127.0.0.1:8964; PROXY 127.0.0.1:6489 -i [PROXY], --iproxy [PROXY] internal Proxy server, default is DIRECT, especially for company network if it need a internal proxy to access outside network. -p [PORT], --port [PORT] Pac Server Port [OPTIONAL], examples: 8970
- Run as a HTTP PAC server:
$ ./flora_pac -x 'SOCKS5 127.0.0.1:8964; SOCKS 127.0.0.1:8964; DIRECT' -p 8970
- Use test_build.sh to generate a pac file, replace the proxy address in the script before you launch it.
$./test_buils.sh
flora_pac.pac and flora_pac_min.pac will be generated, floar_pac_min.pac is samller than the flora_pac.pac, but hard for reading. you can edit the flora.pac to add safeDomain and dangerDomain.
Performance
Testing pac generated by FloraPac total: 141.094597ms avg: 2.03893926300578ns total: 151.273405ms avg: 2.18603186416185ns Testing pac generated by FloraPacNJS total: 10496.94823ms avg: 151.69000332369941ns Testing pac generated by gfwlist2pac total: 43.744876ms avg: 0.6321513872832369ns Testing pac generated by switchysharp total: 71023.601716ms avg: 1026.3526259537573ns Test end
Get help
- twitter: @cnpipe
- blog: https://www.v2root.com/gai-jin-ban-de-fan-qiang-pacwen-jian/