Code Monkey home page Code Monkey logo

gfwlist2pac's Introduction

GFWlist2PAC

代理自动配置(Proxy Auto-config)文件生成工具。

  • 代理规则基于gfwlist
  • 支持用户自定义规则
  • 获取gfwlist时允许独立设置代理

本工具在JinnLynn/GenPAC项目基础上修改而成,主要做了如下修订

  • 简化了gfwProxy和pacProxy的配置
  • pacProxy支持多种代理方式共有
  • 解决了配置文件里debug变量注释后报错的问题
  • 代码风格调整,去除了部分全局变量,改用局部变量

如何使用

配置

用任意文本编辑工具打开gfwlist2pac.cfg文件,根据文件内的注释配置相应的变量。

自定义规则

gfwlist2pac.rules是用户自定义规则,语法与gfwlist相同,即AdBlock Plus过滤规则,详见文件内说明,或访问这里

生成

开发语言为Python,版本要求2.7。

Mac OSX已自带Python,在终端执行./gfwlist2pac.py即可。

Windows需要安装Python,在其官网可以找到安装包(版本务必选择2.7),安装后在命令行执行python gfwlist2pac.py即可

*nix与Mac OSX类似。

使用

如何使用自动代理请自行Google,需要说明的是Mac OSX Lion下的Safari由于其沙盒机制的原因无法使用本地PAC文件,需要使用Web Sharing或将PAC文件放在服务器,然后通过http访问。

LICENSE

The MIT License.

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.