all: use parallel dialer for bootstrapping ip

So we don't have to depend on network probing for checking ipv4/ipv6
enabled, making ctrld working more stably.
This commit is contained in:
Cuong Manh Le
2023-04-25 01:36:51 +07:00
committed by Cuong Manh Le
parent f73cbde7a5
commit 0af7f64bca
7 changed files with 108 additions and 95 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ func LookupIP(domain string) []string {
}
func lookupIP(domain string, timeout int, withBootstrapDNS bool) (ips []string) {
resolver := &osResolver{nameservers: availableNameservers()}
resolver := &osResolver{nameservers: nameservers()}
if withBootstrapDNS {
resolver.nameservers = append([]string{net.JoinHostPort(bootstrapDNS, "53")}, resolver.nameservers...)
}