Skip to content

A simple HTTP/HTTPS proxy can intercept and forward traffic upstream, as well as inspect and modify headers. It also supports authentication of upstream proxies.

License

Notifications You must be signed in to change notification settings

nsotelo/simple-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A python proxy made from the stdlib

This is made to work with the latest versions of python, I've adapted it from this gist and have tested with python 3.7 and 3.8.

It's not yet been production hardened and is very basic, but hopefully it's simple enough that you can adapt it to your needs. I've been using to give more control over the proxy used by a selenium web browser and it does what I need, although being single-threaded brings a noticeable performance impact.

Usage

Since it's just the python stdlib, no virtual env is needed. Just clone and run ./proxy.py or if you're feeling brave

curl https://raw.githubusercontent.com/alephu5/simple-proxy/master/proxy.py | python3

It will automatically bind to a free port on localhost and show a log message so you can try it out. I've picked a random free proxy for testing this out so can't guarantee if it'll work, but it should be obvious how to modify this.

About

A simple HTTP/HTTPS proxy can intercept and forward traffic upstream, as well as inspect and modify headers. It also supports authentication of upstream proxies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages