cmd/ctrld: add default timeout for os resolver

So it can fail fast if internet broken suddenly. While at it, also
filtering out ipv6 nameservers if ipv6 not available.
This commit is contained in:
Cuong Manh Le
2023-03-15 20:04:26 +07:00
committed by Cuong Manh Le
parent 096e7ea429
commit 77b62f8734
2 changed files with 24 additions and 4 deletions
+3 -2
View File
@@ -342,6 +342,7 @@ func ttlFromMsg(msg *dns.Msg) uint32 {
}
var osUpstreamConfig = &ctrld.UpstreamConfig{
Name: "OS resolver",
Type: ctrld.ResolverTypeOS,
Name: "OS resolver",
Type: ctrld.ResolverTypeOS,
Timeout: 2000,
}