A lightweight, async DNS server written in Rust, built from scratch using tokio
. It parses raw DNS packets manually and supports:
β
DNS query parsing
β
UDP socket handling
β
Hardcoded A record replies
β
Forwarding to Remote DNS server 8.8.8.8
when record not found
β
In-memory response caching
- Built with
tokio
and purestd
for learning and performance - Handles DNS over UDP (port
5354
) - Caches responses using an in-memory
RwLock<HashMap<..>>
- Manually parses DNS headers and questions β no magic libraries
- Forwards queries to Google DNS (8.8.8.8) if not in cache
cargo run