How semihalev/sdns works
Main Components Identification
The system should be represented with these key components:
a) Core DNS Server Components:
• DNS Protocol Handlers (UDP/TCP/DoT/DoH/DoQ)
• Query Router/Dispatcher
• Cache System
• DNSSEC Validator
• Middleware Chain
b) External Interfaces:
• HTTP API Server
• Metrics Endpoint
• Configuration Manager
┌─ Client Layer ─────────────────────────────────┐
• DNS Clients │ DoT Clients │ DoH Clients │ DoQ │
• ┴─────────────┴─────────────┴──────┘
┌─ Server Layer ────────────────────────────────────────────┐
• ┌─────────┐ ┌────────┐ ┌─────────┐ ┌────────┐ │
• DNS :53 │ │DoT:853 │ │DoH:8053 │ │DoQ:853 │ API Server│
• ┘ └────────┘ └─────────┘ └────────┘ │
• ┘
┌─ Middleware Chain ──────────────────────────────────────┐
• AccessList → RateLimit → Metrics → Cache → Resolver ... │
• ┘
┌─ Core Services ───────────────────────────────────────┐
• Cache Manager │ DNSSEC Validator │ Query Router │
• ┘
┌─ External Communication ────────────────────────────┐
• Root Servers │ Fallback Servers │ Forwarders │
• ┘
Component Relationships
• Query flow from clients through the system
• Cache read/write operations
• DNSSEC validation flow
• Middleware chain execution order
• External server communications
Technical Details
Annotations for:
• Port numbers (53, 853, 8053)
• Supported protocols (UDP, TCP, TLS, HTTPS, QUIC)
• Cache size limits
• Rate limiting thresholds
• Timeout values
Implementation Notes
• The middleware-based architecture (shown in middleware/ directory)
• The plugin system's extensibility
• Multiple server type support (shown in server/ directory)
• Cache implementation (shown in cache/ directory)
• Authentication and authorization flow (shown in authcache/ directory)