Unifying DNS from /etc/resolv.conf function

As part of v1.4.0 release, reading DNS from /etc/resolv.conf file is
only available for Macos. However, there's no reason to prevent this
function from working on other *nix systems.

This commit unify the function to *nix, so it could be added as DNS
source for Linux and Freebsd.
This commit is contained in:
Cuong Manh Le
2025-04-15 18:51:56 +07:00
committed by Cuong Manh Le
parent 0c2cc00c4f
commit c06c8aa859
6 changed files with 63 additions and 53 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ const (
)
func dnsFns() []dnsFn {
return []dnsFn{dns4, dns6, dnsFromSystemdResolver}
return []dnsFn{dnsFromResolvConf, dns4, dns6, dnsFromSystemdResolver}
}
func dns4() []string {