Giter Site home page Giter Site logo

gfwlist2pac-shell's Introduction

gfwlist2pac-shell

Translate the gfwlist in base64 to efficient pac file with X-level domain validation

This project is mainly created by @clowwindy via python

This version is just an implementation of pure shell

Generate O(1) PAC file from gfwlist.

Dependency

A socks5 proxy is needed to download the gfwlist.

You can make one via shadowsocks or ssh -D, the PROXY will be used to generate the pac file as well, so it should be an commonly used local address.

# socks5 proxy ssh -D, shadowsocks or others
PROXY="127.0.0.1:7070"

Beacuse of the limitation of shell, i migration to zsh, you can easily install with apt-get, yum, pacman in any kind of linux platform.

The cli version of curl, openssl which was integrated into most popular linux version.

You can specify the tools customly.

# curl & openssl cli command path
CURL=/usr/bin/curl
CURLOPT=(-s -x socks5://$PROXY)
OPENSSL=/usr/bin/openssl

Custom

You can add some domains to custom.txt, it will be added into the pac file automatically. One domain per-line.

github.com
dropbox.com
linode.com
stackoverflow.com
linost.com
eigenlogik.com
iceimg.com
jetbrains.com
instagram.com
linkedin.com
agilebits.com
godaddy.com
startssl.com
btdigg.org
digitalattackmap.com
igvita.com
apache.org
jquery.com
speedtest.net

Usage

after all dependency ready

Usage. ./gfw.sh [filename.pac]

Eg. ./gfw.sh release/proxy.pac

The proxy.pac will be generated to release/proxy.pac

Performance

An example of generated PAC file is [here] 1.

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

Testing pac generated by gfwlist2pac
total: 46.411584ms
avg: 0.6706876300578034ns

Testing pac generated by switchsharp
total: 58828.813476ms
avg: 850.1273623699423ns

gfwlist2pac-shell's People

Contributors

cuber avatar nyim avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.