← All work
Foundations
DNS Resolver
The internet phone book, implemented by hand.
A recursive DNS resolver built from scratch on the standard library: it parses and serialises the raw DNS wire format (including name compression), resolves iteratively from the root servers, and caches answers respecting their TTLs.
What it demonstrates
Networking fundamentals · systems programming · defensive parsing
How it is verified
17/17 tests, including the parser fuzzed with 8,000 random/corrupt packets — the only acceptable failure is a clean error, never a crash.
Highlights
- A hand-written RFC 1035 wire codec, including compression pointers, proven to round-trip.
- Resolution logic separated from I/O, so delegation, glue, CNAME chasing and caching are tested with no network.
- A TTL cache with an injectable clock for deterministic expiry tests.