Z13: Runtime handles RENDEZVOUS/PUSH_DIRECT_PATHS - #3
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR implements UDP hole punch functionality for ZeroTier direct path establishment. It adds control message handlers (Rendezvous, PushDirectPaths) to the dataplane runtime, introduces per-peer endpoint management infrastructure, and includes integration tests verifying hole punch packet exchanges. Changes
Sequence Diagram(s)sequenceDiagram
participant Root as ZeroTier Root
participant RxLoop as ZeroTierDataplaneRxLoops
participant Runtime as ZeroTierDataplaneRuntime
participant Manager as DirectEndpointManager
Root->>RxLoop: Rendezvous packet
RxLoop->>RxLoop: TryDispatchResponse fails
RxLoop->>Runtime: HandleRootControlPacketAsync(Rendezvous, ...)
Runtime->>Runtime: GetOrCreateDirectEndpointManager(peerId)
Runtime->>Manager: HandleRendezvousFromRoot(...)
Manager->>Manager: Parse rendezvous endpoint
Manager->>Root: Send hole punch packet
sequenceDiagram
participant Peer as Remote Peer
participant Handler as ZeroTierDataplanePeerPacketHandler
participant Runtime as ZeroTierDataplaneRuntime
participant Manager as DirectEndpointManager
Peer->>Handler: PushDirectPaths packet
Handler->>Handler: Dispatch to control handler
Handler->>Runtime: HandlePeerControlPacketAsync(peerId, PushDirectPaths, ...)
Runtime->>Runtime: GetOrCreateDirectEndpointManager(peerId)
Runtime->>Manager: HandleDirectPathsFromPeer(...)
Manager->>Manager: Update direct endpoints
Manager->>Peer: Send hole punch packet
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implements handling of root RENDEZVOUS + peer PUSH_DIRECT_PATHS in ZeroTierDataplaneRuntime and sends UDP hole punches. Adds unit tests and marks the final MVP checklist item complete.
Summary by CodeRabbit
New Features
Tests