socketry / async-dns

An asynchronous DNS resolver and server.
MIT License
96 stars 14 forks source link

Default to system nameservers if a Resolver is initialized without any. #30

Closed seandilda closed 2 months ago

seandilda commented 2 months ago

This change allows Resolver to be created without specifying nameservers. When no nameservers are specified, the system resolver config is used.

Types of Changes

Contribution

ioquatix commented 2 months ago

Thanks, this is a reasonable change and a nice improvement.

ioquatix commented 1 month ago

I have been trying out this change, and I found the (my) implementation lacking.

Specifically, just using the system nameservers is insufficient, as there are other options like search domains, and so on, that are required. I've added Async::DNS::System.resolver which is also exposed by Async::DNS::Resolver.default.