Implement fast userspace multihop mesh routing
Replace the one-intermediate-peer relay with protocol-scoped connectivity graphs and precomputed shortest-path/ECMP forwarding snapshots. Independent transport readers forward opaque transit frames without a plugin or TUN round trip. Carry source, destination, a bounded hop limit and stable flow tags; preserve end-to-end WireGuard links across topology changes. Classify IP flows before encryption and preserve their tags through the WireGuard pending queue. Add offline four-agent path-change coverage, loop and isolation tests, and an opt-in release forwarding microbenchmark. Bump control/data ALPNs while preserving persistent network identities and state. Also include the pending Windows Mainline idle-timeout fix and its regression test, using a reproducible vendored dependency patch. Validation: fmt, workspace Clippy with warnings denied, and 307 release tests passed. Two pre-existing Windows SQLite wipe failures were excluded; public DHT and the manual benchmark remain ignored by default. The forwarding microbenchmark measured 103 ns (64 B) and 202 ns (1280 B) per transit packet, excluding encryption and socket I/O.
This commit is contained in:
+13
-1
@@ -35,6 +35,16 @@ a `PluginContext` for re-announcements and error reports, and a bounded
|
||||
A data plane failure never stops the daemon: the control plane keeps running
|
||||
and the agent stays manageable.
|
||||
|
||||
## Userspace routing
|
||||
|
||||
The routing engine builds shortest paths over opaque peer identifiers, with no
|
||||
WireGuard or iroh dependency. The relay adapter binds those next hops to
|
||||
`PacketLink` handles and publishes an immutable table per network and protocol.
|
||||
One reader per raw transport forwards transit without entering the plugin or
|
||||
TUN. End-to-end plugin links survive physical link changes. The existing
|
||||
authenticated control mesh supplies first-hand topology; the data router does
|
||||
not tunnel control sessions. See [routing.md](routing.md).
|
||||
|
||||
## Module responsibilities
|
||||
|
||||
| component | responsibility |
|
||||
@@ -47,7 +57,9 @@ and the agent stays manageable.
|
||||
| `storage` | mandatory state and the separately recoverable cache |
|
||||
| `state` | signed records that outlive a session, merged between replicas |
|
||||
| `dataplane::transport` | authenticated datagram links to peers; where reachability lives |
|
||||
| `dataplane` | the contract a protocol implements, and nothing else |
|
||||
| `dataplane::routing` | transport-independent graph, shortest paths and opaque flow identifiers |
|
||||
| `dataplane::relay` | immutable forwarding snapshots and transport-to-transport transit |
|
||||
| `dataplane` | the contract an IP protocol implements |
|
||||
| `overlay` | the one interface an agent owns: provisioning, the TUN, whose packet is whose |
|
||||
| `dns` | the DNS view of a network, and telling the system resolver about it |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user