Skip to content

Implement retrieving dns servers in windows#518

Open
nagua wants to merge 1 commit intoNLnetLabs:mainfrom
nagua:resolv_windows_support
Open

Implement retrieving dns servers in windows#518
nagua wants to merge 1 commit intoNLnetLabs:mainfrom
nagua:resolv_windows_support

Conversation

@nagua
Copy link
Copy Markdown

@nagua nagua commented Apr 24, 2025

Currently the ResolvConf does only read the '/etc/resolv.conf' file to find the active DNS servers. This does not work on windows. In windows you can use the GetAdaptersAddresses win32 api function to find the required information.

Currently the ResolvConf does only read the '/etc/resolv.conf' file
to find the active DNS servers. This does not work on windows. In
windows you can use the GetAdaptersAddresses win32 api function to
find the required information.
@nagua nagua force-pushed the resolv_windows_support branch from 68a86bb to 71af8a0 Compare April 24, 2025 23:25
@tertsdiepraam tertsdiepraam requested a review from partim October 30, 2025 15:35
@partim
Copy link
Copy Markdown
Member

partim commented Apr 21, 2026

Thank you for the PR!

First of all, apologies for the ridiculous delay in responding. We’ve been quite busy with Cascade and the unrelated parts of domain fell behind the couch.

While the PR looks good, we feel a bit uncomfortable to add code with quite a bit of unsafe blocks for a system that we are not experienced with and only have limited testing capabilities. I had a quick look at what Hickory does and they seem to be using a crate called ipconfig which provides safe abstractions and, from a cursory look, seems well maintained even if it looks odd on docs.rs.

So, I think I would prefer if we based the server discovery on Windows on that crate. I don’t know if you are interested in converting your PR to that or if you would rather we did the implementation.

Once again, sorry for the delay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants