Feature request: DNS server #223

Open
opened 2025-06-05 21:27:06 +00:00 by jfly · 4 comments

I've been experimenting with adding my non-nixos phone to my clan-managed Zerotier network (clan/clan-core#1268).

I can't (yet ;)) run data-mesher on my Android phone, so I want to run a DNS server that's aware of data-mesher. I ended up writing a coredns plugin to make this happen: https://github.com/jfly/coredns-data-mesher.

I talked to folks at today's clan office hours, and they said adding a DNS server is probably in scope for data-mesher itself. I'd be happy to work on this if you'd like, I'd just like to chat a beforehand about how to do it, as I am far from a go-expert.

I've been experimenting with adding my non-nixos phone to my clan-managed Zerotier network (https://git.clan.lol/clan/clan-core/issues/1268). I can't (yet ;)) run data-mesher on my Android phone, so I want to run a DNS server that's aware of data-mesher. I ended up writing a coredns plugin to make this happen: https://github.com/jfly/coredns-data-mesher. I talked to folks at today's clan office hours, and they said adding a DNS server is probably in scope for data-mesher itself. I'd be happy to work on this if you'd like, I'd just like to chat a beforehand about how to do it, as I am far from a go-expert.
Author

I did some additional research and found https://github.com/sleirsgoevy/gaidns, which is perfect for this: on any machine with data-mesher configured (which hooks into system dns via NSS), you can just run gaidns and have a DNS server that will resolve things using getaddrinfo under the hood.

So now I think there's no value in adding a DNS server to data-mesher itself. I do think there's value in packaging up gaidns and adding a nixos module for it, which could all happen in nixpkgs.

I did some additional research and found https://github.com/sleirsgoevy/gaidns, which is perfect for this: on any machine with data-mesher configured (which hooks into system dns via NSS), you can just run gaidns and have a DNS server that will resolve things using `getaddrinfo` under the hood. So now I think there's no value in adding a DNS server to data-mesher itself. I do think there's value in packaging up gaidns and adding a nixos module for it, which could all happen in nixpkgs.
Member

I like this 👍

I like this 👍
Member

@jfly can you add the nixos module for it to nixpkgs?

@jfly can you add the nixos module for it to nixpkgs?
Author

I will do this after some more battle testing. I've had some weird connectivity issues on my phone, and I'm worried it's about my android phone making multiple dns requests in parallel to gaidns.

I will do this after some more battle testing. I've had some weird connectivity issues on my phone, and I'm worried it's about my android phone making multiple dns requests in parallel to gaidns.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: clan/data-mesher#223