Prefer LAN server answer over public one

While at it, also implementing new OS resolver chosing logic, keeping
only 2 LAN servers at any time, 1 for current one, and 1 for last used
one.
This commit is contained in:
Cuong Manh Le
2024-10-18 01:31:40 +07:00
committed by Cuong Manh Le
parent f87220a908
commit 0cdff0d368
4 changed files with 124 additions and 40 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func TestUpstreamConfig_SetupBootstrapIP(t *testing.T) {
uc.Init()
uc.setupBootstrapIP(false)
if len(uc.bootstrapIPs) == 0 {
t.Log(nameservers())
t.Log(defaultNameservers())
t.Fatal("could not bootstrap ip without bootstrap DNS")
}
t.Log(uc)