A small asynchronous HTTP proxy written in Python (aiohttp). Useful for local debugging, traffic inspection, and learning how proxies work.
Note: HTTP only for now — HTTPS/CONNECT tunneling is not supported yet.
- Async request forwarding with
aiohttp - Docker and bare-metal run modes
/statsendpoint (uptime, bytes transferred)- Basic range-header handling
- Pytest suite for smoke checks
- Apache 2.0 license
docker-compose up
# Proxy listens on http://localhost:8080pip install -r requirements.txt
HTTP_PROXY_PORT=8080 python3 proxy.pyPoint an app or browser at the proxy:
export http_proxy=http://localhost:8080
curl -x http://localhost:8080 http://example.comOr set the HTTP proxy in Firefox / another browser that supports per-app proxies.
Docker note: if HTTP_PROXY is already set at the OS level, prefer running the proxy as a host Python process so the container is not affected by that setting.
With the proxy running:
http://localhost:8080/stats
Returns JSON with:
uptimebytes transferred(and related counters)
pip install -r test_requirements.txt
pytest tests.py- No HTTPS / CONNECT support yet
- Intended for local/dev use, not as a hardened production edge proxy
Apache 2.0 — see LICENSE.
© Mohit Ranka