Summary
Give each sandbox an automatic public HTTPS endpoint so users can preview web apps, share demos, and expose services without manual port forwarding.
User stories
- "I'm building a React app in the sandbox and want to preview it in my browser"
- "I want to share a link to my running app with a teammate for feedback"
- "I'm developing an API and want to test it from Postman / curl externally"
Current state
The server proxies agent dashboard ports via /proxy/{id}/{path}, but this is:
- Authenticated (session owner only)
- Single port per agent (hardcoded in agent.json)
- Server-mediated (all traffic flows through FastAPI)
- Not shareable
Proposed behavior
Each sandbox gets a URL like {session-id}.sandbox.remolt.dev that routes directly to the pod. Any port the user exposes inside the sandbox is accessible.
Current: Browser → remolt.dev/proxy/{id}/{path} → server → pod:port
Proposed: Browser → abc123.sandbox.remolt.dev → Cloudflare/Ingress → pod:port
Implementation options
1. Cloudflare Tunnel per pod (simplest for current infra)
- Sidecar container runs
cloudflared tunnel in each pod
- Registers
{session-id}.sandbox.remolt.dev with Cloudflare
- Auto-TLS, no ingress controller needed
- Teardown on pod destruction
2. Wildcard Ingress + cert
- Wildcard DNS
*.sandbox.remolt.dev → Ingress controller
- Ingress rule per session, created/deleted with pod lifecycle
- Wildcard TLS cert (Let's Encrypt or Cloudflare Origin CA)
3. Server proxy enhancement (least infrastructure change)
- Extend current
/proxy/{id}/{path} to support any port, not just agent dashboard
- Add optional public/shareable mode (token-gated or fully public)
- Still server-mediated but no DNS/ingress changes needed
Considerations
- Security: should sandbox URLs be public by default, or require explicit opt-in?
- Port discovery: how does the user specify which port(s) to expose?
- Auth: public links vs. token-gated links vs. session-owner-only
- Bandwidth: public URLs could be abused — tie into existing bandwidth limiting
- Cleanup: tunnel/ingress rules must be torn down when pod is destroyed
Competitive context
- Shellbox gives every box automatic HTTPS + TLS
- GitHub Codespaces has port forwarding with shareable URLs
- Gitpod has public/private port visibility controls
Summary
Give each sandbox an automatic public HTTPS endpoint so users can preview web apps, share demos, and expose services without manual port forwarding.
User stories
Current state
The server proxies agent dashboard ports via
/proxy/{id}/{path}, but this is:Proposed behavior
Each sandbox gets a URL like
{session-id}.sandbox.remolt.devthat routes directly to the pod. Any port the user exposes inside the sandbox is accessible.Implementation options
1. Cloudflare Tunnel per pod (simplest for current infra)
cloudflared tunnelin each pod{session-id}.sandbox.remolt.devwith Cloudflare2. Wildcard Ingress + cert
*.sandbox.remolt.dev→ Ingress controller3. Server proxy enhancement (least infrastructure change)
/proxy/{id}/{path}to support any port, not just agent dashboardConsiderations
Competitive context