mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
Use ControlD anycast IP if no system DNS found
This commit is contained in:
@@ -29,6 +29,13 @@ const (
|
|||||||
var bootstrapDNS = "76.76.2.0"
|
var bootstrapDNS = "76.76.2.0"
|
||||||
var or = &osResolver{nameservers: nameservers()}
|
var or = &osResolver{nameservers: nameservers()}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
if len(or.nameservers) == 0 {
|
||||||
|
// Add bootstrap DNS in case we did not find any.
|
||||||
|
or.nameservers = []string{net.JoinHostPort(bootstrapDNS, "53")}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Resolver is the interface that wraps the basic DNS operations.
|
// Resolver is the interface that wraps the basic DNS operations.
|
||||||
//
|
//
|
||||||
// Resolve resolves the DNS query, return the result and the corresponding error.
|
// Resolve resolves the DNS query, return the result and the corresponding error.
|
||||||
|
|||||||
Reference in New Issue
Block a user