Skip to main content

Module direct

Module direct 

Source
Expand description

Direct method — the peer is already reachable at a known ip:port (publicly routable, or its operator port-forwarded it). No NAT work needed: just hand the strategy the address to dial.

This is FIRST in the traversal order because when it works it is the cheapest and lowest-latency path. It “succeeds” merely by having an address; whether the dial then completes is the strategy’s mTLS step (a refused dial there falls through to the next method).

Structs§

DirectMethod
The direct-dial method: yields the peer’s whole IPv6-first candidate list (PeerTarget::direct_addrs) so the dialer tries IPv6 first and falls back to IPv4, or fails if the peer has no known direct address (then the strategy moves on to the mapping/relay methods).