ipv6 fixes

This commit is contained in:
Ben Sarmiento
2024-01-11 02:35:02 +01:00
parent 9e3d12b008
commit b526da1b4f
2 changed files with 2 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, restrictToHost
restrictToHostsLen := len(restrictToHosts)
randomHost := restrictToHosts[rand.Intn(restrictToHostsLen)]
host = randomHost
address = net.JoinHostPort(host, port)
}
}
ips, err := net.DefaultResolver.LookupIPAddr(ctx, host)

View File

@@ -162,7 +162,7 @@ func RunTest(testType string) {
}
}
fmt.Printf("Here are the results, you can copy-paste the following to your config.yml:\n\n")
fmt.Printf("complete!\n\nHere are the results, you can copy-paste the following to your config.yml:\n\n")
fmt.Println("preferred_hosts:")
for _, info := range okHosts {
fmt.Printf(" - %s # hops: %d latency: %v\n", info.Address, info.Hops, info.Latency)