How anujs-27/spectregate works
SpectreGate authorizes a client by sending an encrypted, fixed-size UDP knock to a daemon that passively captures raw Ethernet traffic; after validating freshness and replay status, the daemon adds the sender and requested port to an nftables set. The client, shared packet/crypto library, and daemon are the main runtime components. The README documents packet sizing, replay protection, and temporary firewall access; the graph’s implementation relationships are limited to the sampled Rust source and those documented flows.
Main entry points: src/main.rs Knock Validation · src/main.rs Client CLI · lib.rs Packet Crypto
Components 11
Knock Client
- Client CLI
spectregate-client/src/main.rs
Packet Security
- Packet Crypto
spectregate-core/src/lib.rs
Daemon Processing
- Raw Capture
spectregate-daemon/src/main.rs - Knock Validation
spectregate-daemon/src/main.rs - Nonce Cache
spectregate-daemon/src/main.rs
Firewall Gate
- Firewall Update
spectregate-daemon/src/main.rs
Other components
- Operator
- Shared Key File
- UDP Knock
- Network
- nftables Set
Connections 14
- Operator → Client CLI: runs with parameters
README.md - Client CLI → Shared Key File: reads key
spectregate-client/src/main.rs - Operator → Shared Key File: provides shared key
README.md - Client CLI → Packet Crypto: encrypts payload
spectregate-client/src/main.rs - Packet Crypto → UDP Knock: produces packet
spectregate-core/src/lib.rs - Client CLI → UDP Knock: sends UDP
spectregate-client/src/main.rs - UDP Knock → Network: travels over
README.md - Network → Raw Capture: delivers knock
README.md - Raw Capture → Knock Validation: dispatches payload
spectregate-daemon/src/main.rs - Knock Validation → Shared Key File: reads key
spectregate-daemon/src/main.rs - Knock Validation → Packet Crypto: decrypts payload
spectregate-daemon/src/main.rs - Knock Validation → Nonce Cache: checks and records nonce
spectregate-daemon/src/main.rs - Knock Validation → Firewall Update: triggers on valid knock
spectregate-daemon/src/main.rs - Firewall Update → nftables Set: adds timed element
spectregate-daemon/src/main.rs