Disable fallback DNS resolver
This commit is contained in:
@@ -36,7 +36,6 @@ import (
|
||||
"github.com/sagernet/tailscale/ipn/ipnstate"
|
||||
"github.com/sagernet/tailscale/logtail"
|
||||
"github.com/sagernet/tailscale/net/dnscache"
|
||||
"github.com/sagernet/tailscale/net/dnsfallback"
|
||||
"github.com/sagernet/tailscale/net/netmon"
|
||||
"github.com/sagernet/tailscale/net/netutil"
|
||||
"github.com/sagernet/tailscale/net/netx"
|
||||
@@ -273,7 +272,7 @@ func NewDirect(opts Options) (*Direct, error) {
|
||||
dnsCache := &dnscache.Resolver{
|
||||
Forward: dnscache.Get().Forward, // use default cache's forwarder
|
||||
UseLastGood: true,
|
||||
LookupIPFallback: dnsfallback.MakeLookupFunc(opts.Logf, netMon),
|
||||
// LookupIPFallback: dnsfallback.MakeLookupFunc(opts.Logf, netMon),
|
||||
Logf: opts.Logf,
|
||||
LookupHook: opts.LookupHook,
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ import (
|
||||
"github.com/sagernet/tailscale/feature/buildfeatures"
|
||||
"github.com/sagernet/tailscale/health"
|
||||
"github.com/sagernet/tailscale/net/dnscache"
|
||||
"github.com/sagernet/tailscale/net/dnsfallback"
|
||||
"github.com/sagernet/tailscale/net/netutil"
|
||||
"github.com/sagernet/tailscale/net/netx"
|
||||
"github.com/sagernet/tailscale/net/sockstats"
|
||||
@@ -370,7 +369,7 @@ func (a *Dialer) resolver() *dnscache.Resolver {
|
||||
|
||||
return &dnscache.Resolver{
|
||||
Forward: dnscache.Get().Forward,
|
||||
LookupIPFallback: dnsfallback.MakeLookupFunc(a.logf, a.NetMon),
|
||||
// LookupIPFallback: dnsfallback.MakeLookupFunc(a.logf, a.NetMon),
|
||||
UseLastGood: true,
|
||||
Logf: a.Logf, // not a.logf method; we want to propagate nil-ness
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import (
|
||||
"github.com/sagernet/tailscale/logtail"
|
||||
"github.com/sagernet/tailscale/logtail/filch"
|
||||
"github.com/sagernet/tailscale/net/dnscache"
|
||||
"github.com/sagernet/tailscale/net/dnsfallback"
|
||||
"github.com/sagernet/tailscale/net/netknob"
|
||||
"github.com/sagernet/tailscale/net/netmon"
|
||||
"github.com/sagernet/tailscale/net/netns"
|
||||
@@ -830,7 +829,7 @@ func dialContext(ctx context.Context, netw, addr string, netMon *netmon.Monitor,
|
||||
dnsCache := &dnscache.Resolver{
|
||||
Forward: dnscache.Get().Forward, // use default cache's forwarder
|
||||
UseLastGood: true,
|
||||
LookupIPFallback: dnsfallback.MakeLookupFunc(logf, netMon),
|
||||
// LookupIPFallback: dnsfallback.MakeLookupFunc(logf, netMon),
|
||||
}
|
||||
dialer := dnscache.Dialer(nd.DialContext, dnsCache)
|
||||
c, err = dialer(ctx, netw, addr)
|
||||
|
||||
Reference in New Issue
Block a user