Skip to content

openlist/openlist-china

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version license downloads Maintenance

An autoproxy pac builder for mainland China.

Install globally:

npm install -g openlist
openlist --help
# Usage: openlist [options]
#
# Options:
#
#   -h, --help           output usage information
#   -V, --version        output the version number
#   -y, --match <proxy>  proxy for matched url
#   -n, --miss <proxy>   proxy for missed url
#   -r, --rule <path>    source file path
#   -o, --output <path>  output target file path
#
# Default options:
#   openlist -r rules/openlist.txt \
#            -o openlist.pac \
#            -y 'SOCKS5 127.0.0.1:1080; PROXY 192.168.1.1:8123; DIRECT;' \
#            -n 'DIRECT'

Common use cases:

use the built-in list which covers most common websites:

openlist # will generate a openlist.pac file

or use the gfwlist which is more extensive:

openlist -r <(curl https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt | base64 -d) # convert gfwlist to autoproxy pac file

Or use as a nodejs module:

var openlist = require('openlist') // built-in list is installed by default
openlist.match('https://www.google.com/ncr') // true

openlist.clear() // unset all preset rules
openlist.match('https://twitter.com/') // false

openlist.add('||twitter.com')
openlist.match('https://twitter.com/') // true

About

Across the Great Wall, we can reach every corner in the world.

Resources

Stars

Watchers

Forks

Packages

No packages published