ipv6 fixes
This commit is contained in:
@@ -132,6 +132,7 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, restrictToHost
|
|||||||
restrictToHostsLen := len(restrictToHosts)
|
restrictToHostsLen := len(restrictToHosts)
|
||||||
randomHost := restrictToHosts[rand.Intn(restrictToHostsLen)]
|
randomHost := restrictToHosts[rand.Intn(restrictToHostsLen)]
|
||||||
host = randomHost
|
host = randomHost
|
||||||
|
address = net.JoinHostPort(host, port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ips, err := net.DefaultResolver.LookupIPAddr(ctx, host)
|
ips, err := net.DefaultResolver.LookupIPAddr(ctx, host)
|
||||||
|
|||||||
@@ -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:")
|
fmt.Println("preferred_hosts:")
|
||||||
for _, info := range okHosts {
|
for _, info := range okHosts {
|
||||||
fmt.Printf(" - %s # hops: %d latency: %v\n", info.Address, info.Hops, info.Latency)
|
fmt.Printf(" - %s # hops: %d latency: %v\n", info.Address, info.Hops, info.Latency)
|
||||||
|
|||||||
Reference in New Issue
Block a user