A simple HTTP proxy ( no support for HTTPS yet).
You can either
docker-compose up
- It would run the proxy on your localhost on port 8080 in a containerHTTP_PROXY_PORT=<port-of-your-choice> python3 proxy.py
There is a small testsuite in tests.py, that tests for sanity of the proxy. You can run it with the following commands.
pip install -r test_requirements.txt
pytest tests.py
You can set the proxy at the application level eg. for your browser that allow for setting
browser specific HTTP_PROXY
(such as Firefox) or $http_proxy
variable for commandline applications.
At the moment, docker based proxy does not work if HTTP_PROXY
is set at os level. If you intent to
set the HTTP_PROXY
for the entire os I suggest running proxy as a python process on the host.
computer.
Once the proxy is up and running, you can go to http://localhost:8080/stats
to see the following information
as json
- uptime
- bytes transferred
Released under Apache 2.0. Please see License to see full terms.
© 2019 Mohit Ranka