Skip to content

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

Merged
lawrencecchen merged 1 commit into
feat-iroh-trust-broker-0709from
iroh-broker-fleet
Jul 13, 2026
Merged

lawrencecchen merged 1 commit into
feat-iroh-trust-broker-0709from
iroh-broker-fleet

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

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 ecad500. 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/.

Written for commit ecad500. Summary will update on new commits.

Review in cubic

…v URLs

Replaces the 4 hosted iroh.link relays with our self-hosted fleet in both
allowlists (web MANAGED_RELAY_URLS + presence worker APPROVED_IROH_RELAY_URLS,
kept in lockstep) and the tests that referenced hosted URLs. The self-hosted
relays run iroh-relay 1.0.2 behind per-region MIG+L4-LB (zero-downtime
upgrades), gated by the cmux EdDSA JWT that /api/relay/token (merged, #7879)
mints.
@vercel

vercel Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jul 12, 2026 9:55pm
cmux-staging Building Building Preview, Comment Jul 12, 2026 9:55pm

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ab300ea5-8005-48a0-be0b-937d3c3f259b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch iroh-broker-fleet

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves the broker fleet to seven self-hosted relay.cmux.dev endpoints. The main changes are:

  • Replaces the web publication allowlist with the new relay fleet.
  • Applies the same allowlist to the presence worker.
  • Updates web and worker test fixtures to use the new URLs.

Confidence Score: 4/5

The old-client relay publication path needs a compatibility plan before merging.

  • Both production allowlists are synchronized.
  • Clients still reporting a former relay URL have that path silently removed.
  • The impact lasts until those clients receive and report a new fleet URL.

web/services/iroh/publicationPolicy.ts and workers/presence/src/routePrivacy.ts

Important Files Changed

Filename Overview
web/services/iroh/publicationPolicy.ts Replaces the broker allowlist and immediately stops publishing relay hints from clients still using the former fleet.
workers/presence/src/routePrivacy.ts Mirrors the new seven-relay allowlist in the presence worker.
web/tests/devices-route.test.ts Updates the approved relay fixture to use the new use4 endpoint.
workers/presence/test/core.test.ts Updates heartbeat fixtures to use the new relay fleet.
workers/presence/test/syncPairedMacs.test.ts Updates paired-device synchronization fixtures to use the new relay fleet.
workers/presence/test/syncStorage.test.ts Updates storage synchronization fixtures to use the new relay fleet.
workers/presence/test/validate.test.ts Updates route validation fixtures to use the new relay fleet.

Reviews (1): Last reviewed commit: "iroh: point the broker relay fleet at th..." | Re-trigger Greptile

Comment on lines 10 to +16
export const MANAGED_RELAY_URLS = [
"https://euc1-1.relay.lawrence.cmux.iroh.link/",
"https://use1-1.relay.lawrence.cmux.iroh.link/",
"https://usw1-1.relay.lawrence.cmux.iroh.link/",
"https://aps1-1.relay.lawrence.cmux.iroh.link/",
"https://usc1.relay.cmux.dev/",
"https://usw1.relay.cmux.dev/",
"https://use4.relay.cmux.dev/",
"https://euw4.relay.cmux.dev/",
"https://apne1.relay.cmux.dev/",
"https://apse1.relay.cmux.dev/",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Old Relay Routes Lose Publication

When an already-deployed client continues reporting one of the four former relay URLs during rollout, the exact allowlist check now removes its relay hint. That device remains without a published relay path until it learns and reports the new fleet, so keep the old entries during a compatibility window or ensure clients migrate before this removal.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@lawrencecchen
lawrencecchen merged commit b7975bd into feat-iroh-trust-broker-0709 Jul 13, 2026
34 checks passed

This branch was successfully deployed

1 active deployment
Preview – cmux — ecad5001 Deployed Jul 12, 2026 by vercel[bot]
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