Skip to content

feat: standalone sandbox-proxy with test suite, SNI router, and CI#1

Open
clementblaise wants to merge 8 commits into
mainfrom
init
Open

feat: standalone sandbox-proxy with test suite, SNI router, and CI#1
clementblaise wants to merge 8 commits into
mainfrom
init

Conversation

@clementblaise

@clementblaise clementblaise commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Establishes sandbox-proxy as a standalone repository for the Ridges inference proxy sidecar.
This proxy sits between miner agents and OpenRouter, enforcing cost budgets, model restrictions,
API key validation, and workspace safety policies. It runs as a Docker sidecar in both
Kubernetes Pods and Docker Compose task environments.

Architecture

The proxy has two entry points:

  • HTTPS proxy (port 443/80) — A FastAPI application (main.py) that intercepts HTTP
    requests to the OpenRouter API. It validates the runtime API key against a pre-registered
    SHA-256 hash, checks that the OpenRouter workspace has logging/data-sharing disabled,
    enforces model restrictions, rewrites provider preferences (ZDR, Chutes), sanitizes request
    bodies to a known-safe field allowlist, tracks per-request costs against a USD budget, and
    returns 429 when the budget is exhausted.

  • SNI router (port 15443) — A TCP-level router (sni_router.py) that reads TLS
    ClientHello messages to extract the SNI hostname. Traffic to openrouter.ai is forwarded to
    the local HTTPS proxy for policy enforcement. During the agent phase, all other egress is
    blocked. During the verification phase (signaled by a sentinel file), non-OpenRouter traffic
    is transparently tunneled to its destination without decryption.

@clementblaise clementblaise changed the title Init feat: standalone sandbox-proxy with test suite, SNI router, and CI May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant