Skip to content

feat: surface sidecar QUIC + circuit-relay flags through the launcher#102

Merged
leyten merged 1 commit into
masterfrom
feat/sidecar-nat-flags
Jul 15, 2026
Merged

feat: surface sidecar QUIC + circuit-relay flags through the launcher#102
leyten merged 1 commit into
masterfrom
feat/sidecar-nat-flags

Conversation

@leyten

@leyten leyten commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Surfaces the sidecar NAT-traversal stack (already built in Go) through the Python launcher, so a home or NAT-bound GPU can actually be launched with it. Three env flags, OFF by default (untouched launch = byte-identical legacy tcp-only):

  • SHARD_QUIC=1 -> -quic (udp/quic-v1 listener at the tcp port; better hole-punch on lossy/CGNAT)
  • SHARD_RELAYS=a,b -> -relays (reserve a circuit on public relays when behind NAT)
  • SHARD_RELAY=1 -> -relay (be a public relay + AutoNAT server)

Unit-tested token-exact (split, not substring) so -relays never masquerades as -relay; 39 launcher tests green.

Safe/additive (off by default, launcher-only, no serving-path change) but left as a PR rather than auto-merged because the residential/relay strategy is actively being decided (DZ relay-bridge pivot). The end-to-end QUIC-vs-TCP + hole-punch validation is pending the Ghent link (tasks #6/#7). vast note: QUIC reach also needs the udp port mapped (-p 29600:29600/udp). Tasks #7/#8.

The Go sidecar already implements the NAT-traversal stack (DCUtR hole-punching,
circuit-relay-v2 client/server, AutoNAT, a -quic udp listener) but the Python
launcher had no way to turn any of it on — so a home/residential GPU behind
NAT/CGNAT could not be launched with the features that let it join.

Thread three flags through sidecar_cmd + launch_sidecar, driven by env and OFF by
default (an untouched launch stays byte-identical to the legacy tcp-only form):
  SHARD_QUIC=1     -> -quic    (also listen on udp/quic-v1 at the tcp port)
  SHARD_RELAYS=a,b -> -relays  (reserve a circuit on public relays when NAT'd)
  SHARD_RELAY=1    -> -relay   (be a public relay + AutoNAT server for others)

Unit-tested token-exact (split, not substring) so -relays never masquerades as
-relay; 39 launcher-hardening tests green. This is the wiring; the end-to-end
QUIC-vs-TCP and relay/hole-punch validation is pending the residential (Ghent)
link. Note for vast: QUIC reach also needs the udp port mapped (-p 29600:29600/udp).
@leyten
leyten merged commit 324dfb2 into master Jul 15, 2026
2 checks passed
@leyten
leyten deleted the feat/sidecar-nat-flags branch July 15, 2026 09:15
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