Fix ipv6 stuffs 6
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user