Skip to content

feat(probe): let the remote half run behind a real NAT - #35

Merged
ForeverInLaw merged 1 commit into
mainfrom
feat/probe-nat-rig
Jul 28, 2026
Merged

feat(probe): let the remote half run behind a real NAT#35
ForeverInLaw merged 1 commit into
mainfrom
feat/probe-nat-rig

Conversation

@ForeverInLaw

Copy link
Copy Markdown
Contributor

Adds --remote-bin so the remote end of probe-e2e.mjs can be wrapped in anything that ends up invoking the probe — notably a container on Docker's default bridge, which is a real NAT (MASQUERADE out, no inbound forwarding) rather than a simulated one.

Everything the overlay exists for only matters between two hosts that cannot be dialed directly. A public relay on one end is the easy case and hides exactly the failure worth reproducing.

--remote-bin "docker run --rm -v /usr/local/bin:/opt/probe:ro                   debian:bookworm-slim /opt/probe/mosh-probe"

One file, 11 lines, default unchanged (/usr/local/bin/mosh-probe) — existing invocations behave exactly as before.

Note for whoever uses it: debian:bookworm-slim ships no CA bundle, so the telemetry sink fails silently and half the run goes unobserved. Mount /etc/ssl/certs into the container.

Everything the overlay exists for only matters between two hosts that cannot be
dialed. The rig had a public relay on one end, which is the easy case and hides
exactly the failure being chased — both ends found each other directly and the
discovery layer was never load-bearing.

--remote-bin wraps the remote invocation in anything, so the listener can run in
a container on the default bridge: outbound is masqueraded, inbound is not
forwarded, and the node advertises the host's address with a translated port.
That is a NAT rather than a simulated one, and it reproduces the reported
failure — runs now fail intermittently the way the field does.

  --remote-bin "docker run --rm -v /usr/local/bin:/opt/probe:ro \
                -v /etc/ssl/certs:/etc/ssl/certs:ro \
                debian:bookworm-slim /opt/probe/mosh-probe"

The certificate mount is not optional: a slim image has no CA bundle, the
telemetry sink fails silently, and the remote half of every run goes unobserved
while looking identical to a node that had nothing to say.
@ForeverInLaw
ForeverInLaw merged commit 6069639 into main Jul 28, 2026
3 checks passed
@ForeverInLaw
ForeverInLaw deleted the feat/probe-nat-rig branch July 28, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant