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

+7
View File
@@ -131,3 +131,10 @@ Settings, then create a room.
GID 10001; the chart sets `fsGroup` for that.
- Set `app.previewOrigin: ""` to disable previews. The ingress wildcard
can then be removed.
- Reverse SSH is not installed by this chart. It needs a tunnel-only
sshd sidecar in the same pod, because the forwarded loopback port must
be in the app's network namespace. The app writes
`/data/tunnel/authorized_keys`; mount the data volume into the sidecar
read-only and expose port 2222 with a TCP service. See
`deploy/tunnel` for the sshd config and the app's `TOGETHER_TUNNEL_*`
settings.
@@ -53,6 +53,8 @@ spec:
value: /data/together.db
- name: TOGETHER_SECRET_KEY_FILE
value: /data/secret.key
- name: TOGETHER_TUNNEL_AUTHORIZED_KEYS
value: /data/tunnel/authorized_keys
- name: TOGETHER_WEB_DIR
value: /app/web
- name: TOGETHER_ALLOW_REGISTRATION