Together sandbox: run the egress Guardian on the controller host (one sandbox per run)

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
24/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet

Research direction

Start by tracing the Together API sandbox setup, controller relay, and workload bridge (reverse-client); the issue names no file paths or tests. Check how generic_guardian.py and the existing capture journal are started, then map the proposed host proxy, WebSocket egress, and token allowlist onto those entry points. Done means Together runs use one sandbox per run, capture and observed journals retain their stated behavior, and E2B remains unchanged.

Written by the indexing model from the issue text.

Description

Problem

Together API runs allocate two VMs per cell: a Guardian VM (mitmdump + generic_guardian.py + WS bridge server) and the workload VM. The controller relay already sits in the middle of every captured flow, so the Guardian VM adds cost, startup latency and a second resource to dispose.

Proposal

  • Run mitmdump + generic_guardian.py on the controller host (installed by setup with pinned uv / Python / hash-locked mitmproxy).
  • Workload bridge (reverse-client) routes all egress over the reverse WebSocket on port 18083; the host relay pipes each flow into the local proxy.
  • Intercept every host: capture hosts keep the existing journal (substitution, blocking, exchange facts); other hosts are streamed and recorded in a metadata-only observed journal.
  • Port 18083 inbound allowlist requires the sandbox token in addition to the per-cell token.
  • Bake the workload Node bridge runtime into the snapshot.
  • E2B is unchanged.

Future

When Together sandboxes support outbound rules, deny all egress so the only path out is the inbound WebSocket.

Dominant language
JavaScript
Stars
75
Forks
9
Avg merge
2h 16m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from togethercomputer/hurdle

All issues in togethercomputer/hurdle

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.