How akiidjk/styx works
Main Components Identification
The system can be broken down into these major components:
a) Core Firewall Components:
• eBPF/XDP Module (kernel-level filtering)
• Redis Datastore
• API Server
• Configuration Management
b) User Interface Components:
• Web Interface
• Log Viewer
• Management API
Component Relationships
Key interactions:
a) Data Flow:
• Network traffic → eBPF/XDP programs
• eBPF programs ↔ Userspace program
• Core service ↔ Redis datastore
• API server ↔ Web UI
• Log collection → Log viewer
b) Control Flow:
• Configuration changes → Core service
• API requests → Core service
• Monitoring data → Log viewer
Specific Implementation Details
Technical elements:
a) eBPF Components:
• Counter program (counter.c)
• IP filtering program (filter_ip.c)
• eBPF maps for state sharing
b) Service Components:
• Redis for state management
• HTTP/API server
• Configuration management
c) User Interface:
• Web interface with Tailwind CSS
• Python-based log viewer
• API endpoints
Critical Relationships to Highlight
• Separation between kernel space and user space
• Real-time nature of packet filtering
• Configuration deployment flow
• Monitoring and logging paths
Technical Details
a) Kernel Space:
• eBPF programs (counter.c, filter_ip.c)
• XDP hooks
• eBPF maps
b) User Space:
• Go-based main service
• Redis integration
• Web interface
• Python log viewer
c) APIs and Interfaces:
• Management API
• Monitoring endpoints
• Configuration interfaces