Fix ipv6 stuffs 9

This commit is contained in:
Ben Sarmiento
2024-01-11 03:44:39 +01:00
parent e9e4a7dfc2
commit 5ba1e0a59f

View File

@@ -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 !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))]
req.Host = newHost
req.URL.Host = newHost