A simple DNS server built for the CodeCrafters DNS Server challenge.
Split into two crates:
dns: A library for running a generic DNS server.bits: A library for working with bits that are smaller than au8.codecrafters-dns-server: The application code, implementing the event loop.
The dns crate is the main one to have a look through. It supports:
- Parsing DNS queries from bytes.
- Resolving the DNS query via:
- A static resolver (just returning a single IP address, useful for testing).
- A forwarding resolver (forwarding the request on to another DNS server).
- Serialising a DNS response as bytes.