feat: add reverse ssh sandbox targets

A sandbox behind NAT could not reach the room. A reverse target dials a tunnel-only sshd on the server, forwards localhost:22 to a loopback port, and the worker connects there.

The server assigns the port and writes one authorized_keys line per tunnel target. The key carries permitlisten for that port; the sshd allows remote forwarding only, with no shell or local forwarding. The tunnel private key is shown once and never stored; rotating it rewrites the file. The target list and setup dialog carry the command, and the docs include the sshd config and sidecar requirements.
This commit is contained in:
vhaudiquet committed 2026-11-29 19:25:14 +01:00
1 parent fc684115b5
commit d85f68a176
20 files changed
+893 -38

No files matched your search

+2 -1
View File
@@ -51,7 +51,7 @@ src/config.rs YAML + TOGETHER_* env
src/db.rs schema and migrations
src/crypto.rs ChaCha20Poly1305 secrets, preview HMAC
src/auth.rs sessions, cookies, CSRF
src/state.rs AppState: db, hub, secrets, runner, tunnels
src/state.rs AppState: db, hub, secrets, rooms, workers, presence
src/api/ routes: auth, settings, rooms, messages, files
src/room/agent.rs per-turn config, ssh sandbox, HostAgent assembly
src/room/runner.rs one task per room; mention -> turn; steering
@@ -59,6 +59,7 @@ src/room/message_tool.rs the agent's voice in the room
src/room/preview_tool.rs the agent's preview target
src/worker.rs disposable data plane: loopback HTTP, PTY, forward, worker spawn
src/ssh.rs russh client and PTY pump, used only by the worker
src/tunnel.rs reverse ssh ports and the tunnel sshd authorized_keys file
src/preview.rs signed preview hosts, worker forward, static reads
web/app/ Nuxt 4 SPA (no SSR)
```