Skip to content

Commit

Permalink
Change DoT default port to 853
Browse files Browse the repository at this point in the history
  • Loading branch information
kkc committed Jun 26, 2020
1 parent 3b39eb3 commit 41b221b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prober/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41b221b

Please sign in to comment.