Skip to content

isnofate/gfwlist2pac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GFWList2PAC

PyPI version Build Status Coverage Status

Generate fast PAC file from gfwlist. Examples: fast mode / precise mode.

Fast mode: use O(1) domain lookup

Precise mode: use adblock plus engine

Usage

pip install gfwlist2pac

usage: gfwlist2pac [-h] [-i GFWLIST] -f PAC -p PROXY [--user-rule USER_RULE]
               [--precise]

optional arguments:
  -h, --help            show this help message and exit
  -i GFWLIST, --input GFWLIST
                        path to gfwlist
  -f PAC, --file PAC    path to output pac
  -p PROXY, --proxy PROXY
                        the proxy parameter in the pac file, for example,
                        "SOCKS5 127.0.0.1:1080;"
  --user-rule USER_RULE
                        user rule file, which will be appended to gfwlist
  --precise             use adblock plus algorithm instead of O(1) lookup

Performance

The PAC generated by GFWList2PAC is 1600x faster than SwitchySharp.

Testing fast mode pac generated by gfwlist2pac
avg: 0.49us

Testing precise mode pac generated by gfwlist2pac
avg: 1.53us

Testing pac generated by switchysharp
avg: 784.60us

About

Convert GFWList into O(1) PAC file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.7%
  • Other 1.3%