projects
/
blackbox_exporter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b39eb3
)
Change DoT default port to 853 (#655)
author
Kakashi Liu
<kakashi1000@gmail.com>
Fri, 26 Jun 2020 16:41:23 +0000
(
00:41
+0800)
committer
GitHub
<noreply@github.com>
Fri, 26 Jun 2020 16:41:23 +0000
(17:41 +0100)
Signed-off-by: Kakashi Liu <kakashi1000@gmail.com>
prober/dns.go
patch
|
blob
|
blame
|
history
diff --git
a/prober/dns.go
b/prober/dns.go
index d53c7958466773b890ed9898f025b7692dee3333..5ecb6f070f81581cb881002f610dc85353041ed4 100644
(file)
--- 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)