Skip to content

Carrier: any Home reaches any Home by DID through the seed relay; stable public tickets (#345, #336) - #354

Draft
andersalm wants to merge 11 commits into
developfrom
feat/345-carrier-relay
Draft

andersalm wants to merge 11 commits into
developfrom
feat/345-carrier-relay

Conversation

@andersalm

Copy link
Copy Markdown
Contributor

Any Home reaches any Home by DID on any network (#345, decided 11 Oct): the seed is the relay; Carrier stays the one interface.

  • Relay embedded in the seed Runtime's public role (iroh-relay server, loopback behind nginx, per-Home limits); off on ordinary Homes.
  • The pinned relay is the PUBLISHER_GATEWAY origin; Homes accept only that relay; dial by node ID alone; direct paths preferred.
  • One dial path for every Carrier use; the old Public/Isolated modes removed.
  • Tickets list only public addresses and IPv6 binds the fixed port, so the ticket stays the same across restarts (Seed Carrier ticket advertises private Docker bridge addresses #336).
  • CI test: two Homes behind separate NATs talk through the relay (20/20 runs).
    Slot-7 Linux full check PASS on 75cb32c. Seed steps (nginx, config) are in the lane report and go with the second seed upgrade.

…s it (#345)

Every Carrier endpoint is built once with the Home's pinned relay: the default
trusted source's publisher origin (or ELASTOS_RELAY_URL). Homes dial a peer by
node ID alone; ticket addresses are IP hints and tickets stay IP-only so
alpha.13-15 Homes still dial directly. Any other relay is refused by a connect
hook, by a TLS host pin and by never taking relay URLs from tickets.

The seed's public publisher role serves the iroh relay behind its TLS proxy
(carrier_relay_bind_addr, optional TLS pair for address discovery on UDP 7842)
with per-Home connection and byte-rate limits.

The unused Public network mode, ELASTOS_CARRIER_NETWORK and the DHT topic join
are removed; trusted-source, file and operator dials go through one dial by
node ID.
…#345)

scripts/carrier-nat-test.sh builds five network namespaces (an internet with
the relay, two MASQUERADE NATs, two Homes), proves the Homes have no direct
route, then runs the relay role and both Homes from the elastos-server test
binary: each dials the other by node ID alone and both exchange Chat messages
over Carrier gossip. Carrier NAT Linux runs it when its inputs change; the
release policy test checks its path filter.
INSTALL.md says when Carrier uses the relay and what the relay sees.
VERSIONING.md records that PUBLISHER_GATEWAY pins the relay and the seed's
one-time relay setup (legacy relay, certificate, config, nginx).
… like a home router

Found running the test on Linux: `ip link add up` parses `up` as a keyword,
and the NAT namespaces answered pings from the other side.
Found on Linux (1 run in 16): the peer read a half-written ID file.
…v6 too (#336)

When the endpoint has a public address, published tickets drop container
bridge, LAN, CGNAT, link-local and loopback addresses. An IPv4 wildcard on a
fixed Carrier port also binds the same IPv6 port (not required), so the seed's
ticket no longer changes on every restart. Tests: the seed's address set
filters to its public IPv4 and IPv6, and a restart on a fixed port publishes
the same ticket.
@andersalm

Copy link
Copy Markdown
Contributor Author

Cross-family review r1 on 75cb32c: FAIL (P1 relay-pin bypass via gossip/http, P1 unbounded discovery server, P2 per-connection byte limit, P2 private addresses in tickets); fixed in 0bf9e3021.
r2 on eb7206650 (Chat merged in): FAIL (P1 concurrent handshakes bypass connection accounting, carrier_relay.rs:573; P2 discovery port stays bound after a failed start, :662). Fixes in progress; lands after #309 with a PASS.

@andersalm

Copy link
Copy Markdown
Contributor Author

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

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