Expand description
Relayed-transport method (TURN-like) — the last resort, tier 6.
This tier is sharply distinct from the tier-5 hole-punch (super::hole_punch):
| Tier | Method | Relay’s role | Relay bandwidth |
|---|---|---|---|
| 5 | HolePunchMethod | signaling only — brokers a candidate exchange, then the DATA path is peer-to-peer direct | minimal (a few coordination messages) |
| 6 | RelayedTransportMethod (this) | carries ALL data — every byte of the peer connection is proxied through the relay (RLY-002 relay_message) | highest — the relay proxies the whole stream |
Because tier 6 costs the relay the most bandwidth, it is tried only after the tier-5 hole
punch fails: prefer brokering an introduction (hole punch) over proxying the stream (TURN). The
crate::strategy enforces this via super::TraversalKind::rank (HolePunch=4 < Relayed=5).
After the relay opens the tunnel, the resulting byte stream is still wrapped in the same mTLS (peer_id = SHA-256(SPKI)) as every other tier — the relay proxies ciphertext it cannot read.
The relay data-plane is abstracted behind RelayedTransport so the method is unit-tested with
a mock (no real relay). The production impl — ReservationRelayedTransport — opens an RLY-002
forwarding channel to the target peer THROUGH the node’s persistent relay reservation socket
(never a second connection), and hands the caller a RelayTunnel for the byte stream.
Structs§
- Relayed
Transport Method - The tier-6 relayed-transport (TURN-like) method — proxies ALL peer data through the relay. Only reached when every more-direct method (including the tier-5 hole punch) has failed.
- Reservation
Relayed Transport - The PRODUCTION
RelayedTransport: opens the RLY-002 forwarding channel over the node’s LIVE persistent relay reservation (never a second socket), reusing the sameRelayStatushandle the reservation loop publishes its outbound sink through. This is the tier-6 TURN fallback made real.
Traits§
- Relayed
Transport - Abstraction over the relay data plane: open a stream to
target_peerwhose bytes are proxied THROUGH the relay (RLY-002). This is the tier-6 TURN-like fallback — distinct from the tier-5HolePunchCoordinator, which only signals.