Do not send legacy DNS queries to bootstrap DNS

This commit is contained in:
Cuong Manh Le
2025-03-26 23:17:26 +07:00
committed by Cuong Manh Le
parent 8bf654aece
commit 2de1b9929a
4 changed files with 8 additions and 24 deletions
+1 -5
View File
@@ -2,16 +2,12 @@ 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,
@@ -19,7 +15,7 @@ func TestUpstreamConfig_SetupBootstrapIP(t *testing.T) {
Timeout: 5000,
}
uc.Init()
uc.setupBootstrapIP(false)
uc.SetupBootstrapIP()
if len(uc.bootstrapIPs) == 0 {
t.Log(defaultNameservers())
t.Fatal("could not bootstrap ip without bootstrap DNS")