mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
net/dns: replace resolver IPs with type for DoH
We currently plumb full URLs for DNS resolvers from the control server down to the client. But when we pass the values into the net/dns package, we throw away any URL that isn't a bare IP. This commit continues the plumbing, and gets the URL all the way to the built in forwarder. (It stops before plumbing URLs into the OS configurations that can handle them.) For #2596 Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:

committed by
David Crawshaw

parent
7bfd4f521d
commit
9502b515f1
@@ -25,3 +25,8 @@ type Resolver struct {
|
||||
// resolver.
|
||||
BootstrapResolution []netaddr.IP `json:",omitempty"`
|
||||
}
|
||||
|
||||
// ResolverFromIP defines a Resolver for ip on port 53.
|
||||
func ResolverFromIP(ip netaddr.IP) Resolver {
|
||||
return Resolver{Addr: netaddr.IPPortFrom(ip, 53).String()}
|
||||
}
|
||||
|
Reference in New Issue
Block a user