|
|
@ -37,6 +37,7 @@ import (
|
|
|
|
"tailscale.com/types/nettype"
|
|
|
|
"tailscale.com/types/nettype"
|
|
|
|
"tailscale.com/util/cloudenv"
|
|
|
|
"tailscale.com/util/cloudenv"
|
|
|
|
"tailscale.com/util/dnsname"
|
|
|
|
"tailscale.com/util/dnsname"
|
|
|
|
|
|
|
|
"tailscale.com/version"
|
|
|
|
"tailscale.com/wgengine/monitor"
|
|
|
|
"tailscale.com/wgengine/monitor"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -459,11 +460,8 @@ func (f *forwarder) sendDoH(ctx context.Context, urlBase string, c *http.Client,
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
req.Header.Set("Content-Type", dohType)
|
|
|
|
req.Header.Set("Content-Type", dohType)
|
|
|
|
// Note: we don't currently set the Accept header (which is
|
|
|
|
req.Header.Set("Accept", dohType)
|
|
|
|
// only a SHOULD in the spec) as iOS doesn't use HTTP/2 and
|
|
|
|
req.Header.Set("User-Agent", "tailscaled/"+version.Long)
|
|
|
|
// we'd rather save a few bytes on outgoing requests when
|
|
|
|
|
|
|
|
// empirically no provider cares about the Accept header's
|
|
|
|
|
|
|
|
// absence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hres, err := c.Do(req)
|
|
|
|
hres, err := c.Do(req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|