From 63678419a6a274ac6d43d3d4088cad2a1d06371f Mon Sep 17 00:00:00 2001 From: Kakashi Liu Date: Sat, 27 Jun 2020 00:41:23 +0800 Subject: [PATCH] Change DoT default port to 853 (#655) Signed-off-by: Kakashi Liu --- prober/dns.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.25.1