cmux wg dial: a ProxyCommand that reaches a Cloud machine through the app's WireGuard hub

Merged
TE
10d ago
+141-0

Leo (2026-10-25): "One command for a persistent machine: cmux cloud new-machine --persistent --size ..., with built-in bootstrap, no idle pause, and automatic acpmux and fleet-registry enrollment."

cmux wg dial --hub <unix socket> <host> <port>

This connects stdin and stdout to host:port on a Cloud machine, through the WireGuard hub the app already runs. ssh can use it as a ProxyCommand. cmux cloud enroll-machine (#25263) writes an ssh Host block that calls it, so ssh lane-vm-1 works from the Mac.

  • It is split out of #25263 so that PR stays under 800 lines, and lands before it. The code is #25263's wg dial: run_wg_dial, bridge_through_hub, their three tests, and the help and spec lines.
  • If no hub is running, it says so and exits non-zero.
  • SIGINT, SIGTERM or SIGHUP ends the bridge, even on a quiet connection: the whole bridge (dial included) races the process's shutdown signal.

Observed / Not run

No capture: CLI-only.

Timers/loops: none. The bridge ends when either side closes or the process gets a shutdown signal.

Agent session: agent session

šŸ¤– Generated with Claude Code