Fix ipv6 stuffs 9
This commit is contained in:
@@ -222,7 +222,7 @@ func (r *HTTPClient) replaceHostIfNeeded(req *http.Request) {
|
|||||||
}
|
}
|
||||||
// if host is not an IPv6 host, replace it with a random IPv6 host
|
// if host is not an IPv6 host, replace it with a random IPv6 host
|
||||||
if !found {
|
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`)", req.URL.Host)
|
r.log.Warnf("Host %s is not an IPv6 host, replacing with a random IPv6 host (ensure you have preferred_hosts properly set in your config.yml, if unset, run `zurg network-test -t ipv6`)", req.URL.Host)
|
||||||
newHost := r.ipv6Hosts[rand.Intn(len(r.ipv6Hosts))]
|
newHost := r.ipv6Hosts[rand.Intn(len(r.ipv6Hosts))]
|
||||||
req.Host = newHost
|
req.Host = newHost
|
||||||
req.URL.Host = newHost
|
req.URL.Host = newHost
|
||||||
|
|||||||
Reference in New Issue
Block a user