diff --git a/helpers.go b/helpers.go index 33cf7a62..f94b2007 100644 --- a/helpers.go +++ b/helpers.go @@ -318,7 +318,7 @@ func customDialContext(ctx context.Context, network, addr string) (net.Conn, err Timeout: time.Minute * 5, } - if net.ParseIP(host) != nil { + if net.ParseIP(host) != nil || config.DNS.Port == 0 { con, err := dialer.DialContext(ctx, network, addr) return con, err }