Single public URL — desktop.tinyagentos.com — that routes each authenticated web session to that user's linked TAOS controller over the Headscale mesh. The proxy is a thin Go service that: (1) terminates TLS at Caddy, (2) validates the incoming Kratos session cookie via GET /sessions/whoami, (3) looks up the account's bound controller node and its mesh IP in the orchestrator's devices table, and (4) forwards the WebSocket connection to <mesh-ip>:7070 using the platform-admin Headscale identity.
The proxy supports switching between multiple linked controllers via a statusbar dropdown rendered client-side. The dropdown is populated from the orchestrator's /api/v1/devices endpoint, filtered to the authenticated account. Switching sends a new routing hint in the session; the proxy re-targets the WebSocket without a full page reload.
The proxy itself carries no session state — it is stateless and can be restarted without dropping in-flight connections (WebSocket hijacking hands off to the forwarded connection). TLS termination is Caddy's responsibility; the proxy listens on a Unix socket behind Caddy.
Acceptance criteria:
Depends on: #95, #96
Single public URL —
desktop.tinyagentos.com— that routes each authenticated web session to that user's linked TAOS controller over the Headscale mesh. The proxy is a thin Go service that: (1) terminates TLS at Caddy, (2) validates the incoming Kratos session cookie viaGET /sessions/whoami, (3) looks up the account's bound controller node and its mesh IP in the orchestrator'sdevicestable, and (4) forwards the WebSocket connection to<mesh-ip>:7070using theplatform-adminHeadscale identity.The proxy supports switching between multiple linked controllers via a statusbar dropdown rendered client-side. The dropdown is populated from the orchestrator's
/api/v1/devicesendpoint, filtered to the authenticated account. Switching sends a new routing hint in the session; the proxy re-targets the WebSocket without a full page reload.The proxy itself carries no session state — it is stateless and can be restarted without dropping in-flight connections (WebSocket hijacking hands off to the forwarded connection). TLS termination is Caddy's responsibility; the proxy listens on a Unix socket behind Caddy.
Acceptance criteria:
desktop.tinyagentos.comrequires a valid Kratos session; unauthenticated requests redirect to/login<mesh-ip>:7070for that accountDepends on: #95, #96