Giter Club home page Giter Club logo

flora_pac's Introduction

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.

PAC Server demo on Mac

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

flora_pac's People

Contributors

013231 avatar forresty avatar googollee avatar leask avatar usufu avatar yalehuang avatar

Watchers

 avatar  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.