diff --git a/prober/http.go b/prober/http.go index d79e8e1c..5ec1d2d1 100644 --- a/prober/http.go +++ b/prober/http.go @@ -328,7 +328,7 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr targetPort := targetURL.Port() var ip *net.IPAddr - if !module.HTTP.SkipResolvePhaseWithProxy || module.HTTP.HTTPClientConfig.ProxyConfig.ProxyURL.URL == nil || module.HTTP.HTTPClientConfig.ProxyConfig.ProxyFromEnvironment { + if !module.HTTP.SkipResolvePhaseWithProxy || (module.HTTP.HTTPClientConfig.ProxyConfig.ProxyURL.URL == nil && !module.HTTP.HTTPClientConfig.ProxyConfig.ProxyFromEnvironment) { var lookupTime float64 ip, lookupTime, err = chooseProtocol(ctx, module.HTTP.IPProtocol, module.HTTP.IPProtocolFallback, targetHost, registry, logger) durationGaugeVec.WithLabelValues("resolve").Add(lookupTime)