KolibriOS Mini Proxy
Features
- Blocks localhost/private/reserved IPs unless ALLOW_PRIVATE=1
- Manual redirects with per-hop SSRF checks (MAX_REDIRECTS)
- Retries/backoff for 429/5xx & transient errors
- Streams and caps body to MAX_BYTES
- Safe header passthrough + nosniff
How to Run
pip install Flask requests
python3 app.py --host 127.0.0.1 --port 8888
Env Vars
- ALLOW_PRIVATE -
0
blocks hosts that resolve to private/loopback/reserved/link-local/multicast IPs. Set to1
to allow them (disables that SSRF protection).- Default:
0
.
- Default:
- DEFAULT_TIMEOUT - Per-request timeout in seconds for the upstream fetch (connect + read).
- Default:
15
.
- Default:
- MAX_BYTES - Hard cap on how many bytes the proxy will download/return from the upstream response.
- Default:
10 MiB
(10 * 1024 * 1024
).
- Default:
- MAX_RETRIES - Max number of retries on 429/5xx and transient network errors (backoff applied). Up to this many retries after the first attempt.
- Default:
3
.
- Default:
- MAX_REDIRECTS - Maximum redirect hops the proxy will follow, validating each hop before fetching. Exceeds →
502
.- Default:
5
.
- Default:
Example Usage
GET /?site=https://example.com -> returns the fetched response
Description
Languages
Python
95.1%
Nix
4.9%