X Hamster.proxy -
# Install from PyPI (includes optional extras for TLS and metrics) pip install "x-hamster-proxy[tls,metrics]"
python hamster_demo.py
| Feature | Description | |---------|-------------| | (only cryptography for TLS) | Works on any Python ≥3.9, no heavy external libraries. | | Asyncio‑first design | Built on asyncio + httpx ‑style API for non‑blocking I/O. | | Pluggable middleware stack | Similar to express or starlette – you can drop in request‑/response‑handlers. | | Built‑in TLS “man‑in‑the‑middle” (optional, safe by default) | Perfect for testing APIs that require client certificates. | | Dynamic routing & policy engine | Route traffic based on host, path, method, or even Geo‑IP. | | Observability out‑of‑the‑box | Prometheus metrics, structured JSON logs, and an optional UI dashboard. | | Small footprint – ~250 KB source, < 5 MB RAM under load. | Ideal for edge devices, CI pipelines, and dev containers. | x hamster.proxy
If you are interested in learning more about X Hamster Proxy and other proxy servers, here are some resources that you may find helpful: # Install from PyPI (includes optional extras for
def smart_route(request: Request) -> str | None: # 1️⃣ Route all *.cdn.example.com to the nearest edge node if re.match(r".*\.cdn\.example\.com$", request.host): return f"https://edge-{request.geo.region.lower() | | Small footprint – ~250 KB source,
from hamster_proxy import ProxyServer, Request, Response
x hamster.proxy treats each request like a :