diff --git a/config_internal_test.go b/config_internal_test.go index 6823686..44b7e2f 100644 --- a/config_internal_test.go +++ b/config_internal_test.go @@ -2,12 +2,16 @@ package ctrld import ( "net/url" + "os" "testing" + "github.com/rs/zerolog" "github.com/stretchr/testify/assert" ) func TestUpstreamConfig_SetupBootstrapIP(t *testing.T) { + l := zerolog.New(os.Stdout) + ProxyLogger.Store(&l) uc := &UpstreamConfig{ Name: "test", Type: ResolverTypeDOH, diff --git a/resolver.go b/resolver.go index c26560b..f036967 100644 --- a/resolver.go +++ b/resolver.go @@ -367,6 +367,7 @@ func lookupIP(domain string, timeout int, withBootstrapDNS bool) (ips []string) or = newResolverWithNameserver(defaultNameservers()) } nss := *or.lanServers.Load() + nss = append(nss, *or.publicServers.Load()...) if withBootstrapDNS { nss = append([]string{net.JoinHostPort(controldBootstrapDns, "53")}, nss...) }