#180

Feb 27, 2022

The War in Ukraine

Well, this week has certainly been something. The fog of war makes much uncertain, but I’ve been watching the BBC coverage to keep as up-to-date as I can. I found this article by Bret Devereaux a good explanation of the background and potential outcomes.

Ukraine is doing better than I expected. Better than Russia expected too, it seems. But Russia is huge: unless internal pressure makes Putin back down, I don’t have much faith that the Ukrainians could defeat the entire Russian army.

We’ll have to wait and see what the future brings.

Books

This week I read:

Programming

I’ve been working on implementing a little DNS resolver over the past couple of days. I’m writing this in asynchronous Rust, using the tokio runtime. Currently I’m following the two main DNS RFCs:

The goal is to have a recursive resolver with custom records and blocklists: something that could serve as a Pi-hole replacement. I’ve now got a basic non-recursive resolver, which can give answers based on static records configured in a config file, and the outline of a recursive resolver.

The DNS wire format is a bit cryptic, but I got there in the end, and it’s cool to see my resolver working with dig.

My immediate goals are:

  1. Finish the recursive resolver
  2. Implement caching
  3. Add tests

Getting there would be pretty cool, as I’d then have a proof-of-concept (if somewhat clunky to operate) recursive resolver. To make it pleasant to use I’d then need to add:

  1. A parser for zone files, to read:
  2. A way to read a DNS blocklist from a file
  3. A way to trigger an asynchronous reload of the root hints and blocklist

I think if I get all this done, I could feasibly replace my Pi-hole. Running a hand-written DNS resolver for my local network would be very neat. And then, if I still needed things to do, a couple of stretch goals could be: