pub struct KnownAddr {
pub addr: String,
pub active: bool,
}Expand description
One address iroh holds for a peer (#140, api_minor >= 56).
Rendered by the SAME labelling PeerDiagnosticsResult::hint_addrs uses — IPs verbatim, relays
as relay <url> sanitized to scheme+host+port — because the two lists exist to be read side by
side, and differently-formatted addresses would make a formatting difference look like a real
one. The sanitization is not optional here either: this output is meant to be pasted into a
public issue, and an operator’s relay URL can carry a userinfo token.
Fields§
§addr: StringThe address, labelled as above.
active: boolWhether iroh reports this address as in ACTIVE use, as opposed to merely known.
One bit, and it collapses three states. iroh maps only PathStatus::Open to active;
Inactive, Unusable (“we attempted holepunching and it didn’t work”) and Unknown (“we
have not yet attempted holepunching”) all render false. So an idle direct address beside an
active relay is consistent with #140’s selected-path hypothesis and equally consistent with
an ordinary failed hole-punch — which is a NAT diagnosis, the opposite conclusion. This field
cannot discriminate them; it says what is carrying traffic and no more.