iroh broker: use the 7 self-hosted relay.cmux.dev relays

Merged
LA
4mo ago
+24-18

Per Aziz's ask: updates PR #7840's broker fleet from the 4 hosted iroh.link relays to the 7 self-hosted relay.cmux.dev URLs (usc1, usw1, use4, euw4, apne1, apse1, ape1), in both lockstep allowlists (web/services/iroh/publicationPolicy.ts + workers/presence/src/routePrivacy.ts) and the tests referencing hosted URLs.

The self-hosted fleet runs iroh-relay 1.0.2 behind per-region MIG + L4 LB (zero-downtime upgrades, proven 180/180 probes during instance replacement), JWT-gated with per-endpoint connection caps + per-client bandwidth caps. Verified: web devices-route (25) + all 5 iroh suites (102) + presence worker (166) tests pass, web typecheck clean.

@azooz2003-bit merge this into #7840 when it looks good.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


[!NOTE]
Medium Risk
Changing the approved relay fleet affects which Iroh relay URLs clients can use after deploy; old lawrence.cmux.iroh.link URLs will no longer pass allowlist checks until endpoints report the new fleet.

Overview
Replaces the four hosted lawrence.cmux.iroh.link relays with seven self-hosted relay.cmux.dev endpoints (usc1, usw1, use4, euw4, apne1, apse1, ape1) in the Iroh publication allowlists.

web/services/iroh/publicationPolicy.ts (MANAGED_RELAY_URLS) and workers/presence/src/routePrivacy.ts (APPROVED_IROH_RELAY_URLS) stay lockstep—only which relay URLs may be persisted or distributed changes; sanitization behavior is unchanged. Tests that used a hosted relay constant now point at https://use4.relay.cmux.dev/.

Reviewed by Cursor Bugbot for commit ecad50011ff9aaf691373556b7be22e1af9dd156. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Switch the iroh broker to our 7 self-hosted relays at relay.cmux.dev and update tests. Replaces the 4 hosted iroh.link relays and keeps the web and presence allowlists in sync.

  • Refactors
    • Update allowlists in web/services/iroh/publicationPolicy.ts and workers/presence/src/routePrivacy.ts to the seven regions: usc1, usw1, use4, euw4, apne1, apse1, ape1.
    • Update tests to reference https://use4.relay.cmux.dev/.