use custom dialer for http probes

This commit is contained in:
Antonio Ojea 2023-01-17 11:23:16 +00:00
parent d21f98c6f9
commit bfd8f5178e

View File

@ -53,7 +53,11 @@ func NewWithTLSConfig(config *tls.Config, followNonLocalRedirects bool) Prober {
DisableKeepAlives: true,
Proxy: http.ProxyURL(nil),
DisableCompression: true, // removes Accept-Encoding header
// DialContext creates unencrypted TCP connections
// and is also used by the transport for HTTPS connection
DialContext: probe.ProbeDialer().DialContext,
})
return httpProber{transport, followNonLocalRedirects}
}