Code Monkey home page Code Monkey logo

gfw-pac's Introduction

gfw-pac

通过 gfwlist 和** IP 地址生成 PAC(Proxy auto-config) 文件。对存在于 gfwlist 的域名和解析出的 IP 在国外的域名使用代理。

基于 GFWList2PACFlora PAC

特性

  • 速度快,优先按域名匹配,再按 IP 匹配
  • 可自定义需要代理的域名
  • 可自定义不需要代理的域名
  • 如果访问的域名不在列表里,但是 IP 在国外,也返回代理服务器

用法

直接使用 gfw.pac,或者手工运行 gfw-pac.py 生成自己的 pac 文件。

gfw-pac.py 使用说明

usage: gfw-pac.py [-h] [-i GFWLIST] -f PAC -p PROXY [--user-rule USER_RULE]
                  [--direct-rule DIRECT_RULE] [--ip-file IP_FILE]

参数说明:

-h 显示帮助
-i 指定本地 gfwlist 文件,若不指定则自动从 googlecode 下载
-f (必须)输出的 pac 文件
-p (必须)指定代理服务器
--user-rule 自定义使用代理的域名文件,文件里每行一个域名
--direct-rule 自定义不使用代理的域名文件,文件里每行一个域名
--ip-file 指定本地的从 apnic 下载的 IP 分配文件。若不指定则自动从 apnic 下载

举例:

./gfw-pac.py -i gfwlist.txt \
             -f gfw.pac \
             -p "PROXY 192.168.1.200:3128; DIRECT" \
             --user-rule=custom-domains.txt \
             --direct-rule=direct-domains.txt \
             --ip-file=delegated-apnic-latest.txt

一路凯歌 技术博客

gfw-pac's People

Contributors

zhiyi7 avatar

Watchers

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