Skip to content

Carrier: any Home reaches any Home by DID on any network (seed relay) #345

Open

Description

@andersalm

Decision (Anders, 11 Oct). A Home's DID works like a phone number: any Home reaches any other Home by its DID, whatever the network, router or NAT. Carrier stays the one interface for capsules, users and DIDs; how a path is found stays inside Carrier.

Why a meeting point is needed (iroh's NAT traversal):

  1. Two computers behind home routers cannot find each other on their own.
  2. Both first reach a shared meeting point (iroh calls it a relay). It tells each one the other's public address.
  3. Both then connect directly at the same moment. iroh reports this works in about 9 of 10 networks.
  4. The rest stay on the meeting point, still end-to-end encrypted.

History

  • 0.7.0 (1 Sep): Homes used iroh's own public meeting points (n0), so 1:1 worked across networks.
  • 22 Sep (0181c67, shipped in 0.7.1, 2.0.0 and 2.0.1): made every Home direct-only, refusing all relays. No cross-network messaging test caught it.
  • 18 Oct: the same Anders and Sash DM failure was reported.
  • 20 Oct: Anders decided the iroh upgrade and a parked Carrier hardening change come first, then the relay.
  • Lost: that work was set for "0.8.1"; when 0.8.0 became 2.0.0 it was never carried forward.

Today (2.0.1)

  • Production Carrier is direct-only: carrier.rs apply_isolated_endpoint_policy and RejectForeignRelayHook; ELASTOS_CARRIER_NETWORK=public is refused.
  • Online status and Community posts work through the Community node.
  • A direct message is one Carrier dial to the peer (collaboration_direct_messages.rs PeerDid). Across two home networks it stays at "Sending" forever. The failure is logged only at debug level, so it shows nowhere (seen 11 Nov between two Homes on different home networks).

Plan for 2.0.2, in order

  1. Carrier: move to iroh 1.4 with its own network acceptance (step 1 of #345) #570: iroh 1.0.2 to 1.4, with its own network acceptance. No behaviour change.
  2. The parked Carrier hardening change (private, per SECURITY.md) lands before any relay is enabled.
  3. The meeting point on the seed. Draft PR Carrier: any Home reaches any Home by DID through the seed relay; stable public tickets (#345, #336) #354 (head 767a4b08f) is the starting point.
    • Its last review failed: concurrent handshakes bypass connection accounting, and the discovery port stays bound after a failed start.
    • It needs rework on the new iroh and a new review, including Irzhy for security.

Done means

  • The seed runs the meeting point, and its URL and identity are pinned in the signed release. Homes accept only that relay.
  • Dialing a DID needs only the DID. Carrier uses a direct path when one works and the relay otherwise.
  • The relay cannot read traffic. Per-Home limits stop one Home from exhausting it.
  • Capsules and apps keep one Carrier interface; none of them handles relays or addresses.
  • A 1:1 message is delivered and shown as delivered between a Mac on home Wi-Fi and a Jetson on a phone hotspot. Also tested: forced relay fallback, and promotion to a direct path.
  • An update is fetched over Carrier across the same two networks.
  • A CI test runs two Homes behind separate NATs and checks DM delivery.
  • When no path works, the person sees why instead of "Sending" forever, and the failed dial is logged at warn (rate limited).
  • The installed update and Undo journeys pass.

DNS fallback to decide before discovery is switched on (found 12 Nov, #570 review): iroh 1.4.1 replaces hickory-resolver with n0-dns-resolver 0.1.0. When the system resolvers time out, it falls back to public resolvers (Cloudflare, Google, Quad9, including DNS over HTTPS); iroh 1.0 used Google only when the system configuration was unreadable. Direct-only Carrier makes no DNS lookups today, so this is latent. It becomes live with relay or DNS discovery: decide whether to disable the public fallback or name it in the privacy notes, with @irzhywau.

Working default for the relay rework (Main, 13 Nov; not final): the endpoint uses the system resolver only, with the public-resolver fallback disabled. If system DNS fails, relay resolution fails closed and the person sees why. It lives in one place and is easy to change. Irzhy confirms or changes it before the relay or discovery is switched on.

Test to reuse (14 Nov): PR #596 adds an installed two-Home journey (Community post, direct message, sender's delivery state, recovery after the other Home was away) with the network arrangement as one parameter. The relay rework adds two NATs and a forced relay to that journey instead of writing a second one.

Activity

  1. modified the milestones: 0.8.0, After 0.8.0 on Oct 11, 2026
  2. andersalm commented on Oct 13, 2026

    @andersalm
    ContributorAuthor

    Postponed to 0.8.1: any-to-any relay is in draft PR #354; Community works through the seed node.

  3. andersalm commented on Oct 21, 2026

    @andersalm
    ContributorAuthor

    Dependency (Anders, 20 Oct): the Runtime moves to iroh 1.4 before this issue or draft PR #354 switches on any relay. The iroh upgrade gets its own network acceptance first (Community, direct messages and the two-NAT test above).

  4. modified the milestones: After 0.8.0, 2.0.2 on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions