mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 03:52:35 +00:00
net/dns/resolver: on Android, make ExitDNS use net package for DNS
Like Windows. Updates #1738 Change-Id: I9f26bc58ce7e760c749786fbe5d9952c99eeb91c Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
e68d87eb44
commit
8d0ed1c9ba
@ -357,10 +357,7 @@ func (r *Resolver) HandleExitNodeDNSQuery(ctx context.Context, q []byte, from ne
|
|||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
default:
|
default:
|
||||||
return nil, errors.New("unsupported exit node OS")
|
return nil, errors.New("unsupported exit node OS")
|
||||||
case "windows":
|
case "windows", "android":
|
||||||
// TODO: use DnsQueryEx and write to ch.
|
|
||||||
// See https://docs.microsoft.com/en-us/windows/win32/api/windns/nf-windns-dnsqueryex.
|
|
||||||
// For now just use the net package:
|
|
||||||
return handleExitNodeDNSQueryWithNetPkg(ctx, nil, resp)
|
return handleExitNodeDNSQueryWithNetPkg(ctx, nil, resp)
|
||||||
case "darwin":
|
case "darwin":
|
||||||
// /etc/resolv.conf is a lie and only says one upstream DNS
|
// /etc/resolv.conf is a lie and only says one upstream DNS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user