From: Kakashi Liu Date: Fri, 26 Jun 2020 16:41:23 +0000 (+0800) Subject: Change DoT default port to 853 (#655) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=63678419a6a274ac6d43d3d4088cad2a1d06371f;p=blackbox_exporter.git Change DoT default port to 853 (#655) Signed-off-by: Kakashi Liu --- diff --git a/prober/dns.go b/prober/dns.go index d53c795..5ecb6f0 100644 --- a/prober/dns.go +++ b/prober/dns.go @@ -175,7 +175,11 @@ func ProbeDNS(ctx context.Context, target string, module config.Module, registry targetAddr, port, err := net.SplitHostPort(target) if err != nil { // Target only contains host so fallback to default port and set targetAddr as target. - port = "53" + if module.DNS.DNSOverTLS { + port = "853" + } else { + port = "53" + } targetAddr = target } ip, _, err = chooseProtocol(ctx, module.DNS.IPProtocol, module.DNS.IPProtocolFallback, targetAddr, registry, logger)