mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
There are several issues with OS resolver right now: - The list of nameservers are obtained un-conditionally from all running interfaces. - ControlD public DNS query is always be used if response ok. This could lead to slow query time, and also incorrect result if a domain is resolved differently between internal DNS and ControlD public DNS. To fix these problems: - While initializing OS resolver, sending a test query to the nameserver to ensure it will response. Unreachable nameserver will not be used. - Only use ControlD public DNS success response as last one, preferring ok response from internal DNS servers. While at it, also using standard package slices, since ctrld now requires go1.21 as the minimum version.
10 KiB
10 KiB