A lightweight proxy server that exposes HTTP and SOCKS5 endpoints using pproxy. It is designed to be simple to run and easy to configure via environment variables.
- HTTP proxy and SOCKS5 proxy in one process
- Optional username/password authentication
- Works well with local networks (prints LAN IPs on startup)
- Python 3.9+
pip install -r requirements.txtpython proxy_server.pyThe server will bind to 0.0.0.0 by default and listen on:
- HTTP: 8080
- SOCKS5: 1080
Set environment variables to customize behavior:
| Variable | Description | Default |
|---|---|---|
LISTEN_HOST |
Interface to bind | 0.0.0.0 |
HTTP_PORT |
HTTP proxy port | 8080 |
SOCKS_PORT |
SOCKS5 proxy port | 1080 |
PROXY_USER |
Username for auth | (none) |
PROXY_PASS |
Password for auth | (none) |
set LISTEN_HOST=0.0.0.0
set HTTP_PORT=8080
set SOCKS_PORT=1080
set PROXY_USER=myuser
set PROXY_PASS=secret
python proxy_server.py- If you set
PROXY_USER, you must also setPROXY_PASS(and vice versa). - The server prints local LAN IPs that can be used by other devices on your network.