How max-niederman/centipede works
Main Components
a) Core Components:
• Control Plane
• Handshake Management
• Peer Authentication (Ed25519)
• Address Management/Heartbeat System
• Data Plane
• Packet Processing
• Encryption/Decryption (ChaCha20Poly1305)
• Packet Deduplication
• Worker System
• Thread-per-core Architecture
• TUN Queue Management
• UDP Socket Management
b) Package Structure (based on the file tree):
• centipede_api: API interfaces
• centipede_control: Control plane logic
• centipede_proto: Protocol definitions
• centipede_router: Routing and packet management
• centipede_worker: Worker thread implementation
• centipeded: Main daemon
Key Relationships to Highlight
• Bidirectional flows between peers
• Packet flow from TUN devices through the processing pipeline
• Demonstrate the worker thread architecture
• Relationship between control and data planes
Specific Elements
a) External Interfaces:
• Multiple UDP socket interfaces
• TUN device interfaces
• API interface (planned HTTP)
b) Processing Components:
• Packet encryption/decryption modules
• Deduplication system
• Routing logic
• Worker thread pool
c) Control Components:
• Handshake manager
• Peer authentication
• Address management
• Heartbeat system
Important Architectural Aspects to Emphasize
• Lock-free shared state implementation
• Thread-per-core architecture
• Multiple UDP socket sets per worker
• Packet deduplication mechanism
• Stateless user interface design
• NAT traversal capabilities