diff --git a/pkg/http/client.go b/pkg/http/client.go index d854097..e9cff53 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -230,8 +230,7 @@ func (r *HTTPClient) replaceHostIfNeeded(req *http.Request) { // if host is not an IPv6 host, replace it with a random IPv6 host if !found { r.log.Warnf("Host %s is not an IPv6 host (ensure you have preferred_hosts properly set in your config.yml, if unset, run `zurg network-test -t ipv6`)", host) - randomHost := r.ipv6Hosts[rand.Intn(len(r.ipv6Hosts))] - newHost := net.JoinHostPort(randomHost, port) + newHost := r.ipv6Hosts[rand.Intn(len(r.ipv6Hosts))] newURL := *req.URL newURL.Host = newHost req.URL = &newURL