top | item 35920189

(no title)

jvns | 2 years ago

A DNS resolver is both a client and a server -- for example Google's 8.8.8.8 (which this is a toy version of) is a server (you can query it with `dig @8.8.8.8 example.com`), but also a client of the various authoritative DNS servers that it fetches and caches records from.

I implemented this as a command line tool because that's much easier to do in a Jupyter notebook environment, but you can also pretty easily transform it into a UDP server running on localhost and query it with dig in the same way that you would with 8.8.8.8. That's one of the bonus exercises at the end (Exercise 7).

I might end up bringing "convert it into a server" into the main content though because it's pretty easy to do and I think it makes the whole thing seem more "real".

discuss

order

ivlad|2 years ago

Nope, Google’s quad eights is “recursive DNS server”.

Resolver is usually a part of operating system (sometimes) implementing DNS client functionality and serving as a link between a userland library providing, say, getaddrinfo(), and DNS implementation.

This one is even less than a resolver, it does not implement a library link. It’s a toy DNS client, implementing minimal functionality.

alfons_foobar|2 years ago

Quad8 is a recursive resolver.

You are referring to a system's local resolver (which is obviously also a resolver, so you are right on this regard).

But still, this project is _also_ a resolver (although obviously not a complete one, it's a learning project).

alfons_foobar|2 years ago

Just wanted to thank you for this great project, it was a lot of fun :)