Expand description
S7 — Network / NAT screen (docs/PLAN.md § 8.S7).
Answers “I have peers but I’m unreachable” (bee#4194) by surfacing
what the AutoNAT subsystem and /addresses already report:
- Public addresses advertised by the node — every underlay
multiaddr from
/addresses. Loopback and private RFC1918 ranges are dimmed so it’s obvious which entries are routable from outside. - Inbound vs outbound connection counts derived from each
peer’s
MetricSnapshotView::session_connection_direction. This is the numbers operators want to see — a node that’s only making outbound connections is reachable in name only. - Reachability + network availability read off the
/topologystream’s AutoNAT strings, with a stability window (“stable for 9m”) computed in the component. The tooltip captures the truth thatisReachableflickers under symmetric NAT, so operators don’t chase phantom flap.
The truth-telling extras from PLAN (external port-check, relay candidates) require either a separate observer service or fields Bee doesn’t expose today; the screen footer documents that gap.
Render path delegates to the pure Network::view_for so the
snapshot tests in tests/s7_network_view.rs pin the
reachability ladder and the public/private underlay
classification without launching a TUI.
Structs§
- Network
- Network
View - Aggregated view fed to renderer and snapshot tests.
- Underlay
Row
Enums§
- Availability
Status - Tri-state for
networkAvailability. Less ambiguous than reachability — Bee only reportsAvailable/Unavailable/ empty. - Reachability
Status - Tri-state for the AutoNAT-reported reachability string.
- Underlay
Kind - Per-underlay public/private classification — used to dim non- routable rows so operators see which addresses are actually advertised to the network.
Functions§
- classify_
multiaddr - Classify a multiaddr as Public / Private / Unknown by parsing the
/ip4/x.x.x.xor/ip6/...segment. RFC 1918, link-local, and loopback ranges count as Private; DNS/hostname multiaddrs we leave as Unknown because we can’t tell without resolving. - format_
stability - Format a stability duration as
Xh Ym,Xm Ys, orXs. Used by the renderer; not part ofNetworkViewbecause it depends on wall-clock state the snapshot tests can’t pin.