Git Product home page Git Product logo

toproxy's Introduction

toproxy

用tornado实现的高性能代理服务器,涵盖了基本的method

性能方面测试,toproxy在单进程模式下,新连接请求在3500 QPS

New Future

  • 加入了白名单功能
  • 当访问的地址连接失败的时候,会做重试机制
  • support 301 redirect
  • 加入了基本认证

更多的httpclient文档,httpclient 更多文档

安装

方法1:

pip install toproxy

方法2:

python setup.py install

直接使用

python toproxy/proxy.py -h

usage: proxy.py [-h] [-p PORT] [-w WHITE] [-u USER]

python -m toproxy/proxy -p 8888 -w 127.0.0.1,8.8.8.8 -u xiaorui:fengyun

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  tonado proxy listen port
  -w WHITE, --white WHITE
						white ip list ---> 127.0.0.1,215.8.1.3
  -u USER, --user USER  Base Auth , xiaoming:123123

快速启动

python  -m toproxy/proxy -p 8888 -w 127.0.0.1 -u xiaorui:123
python  -m toproxy/proxy
::::Starting HTTP proxy on port 8888
...

模块的调用

from toproxy import run_proxy
run_proxy(port, start_ioloop=False)
...
tornado.ioloop.IOLoop.instance().start()

TODO

  1. 提高toproxy的性能
  2. 加入异步回调通知模式
  3. 批量传送

toproxy's People

Contributors

rfyiamcool avatar

Watchers

James Cloos avatar Shi Pengtao 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.