WIP: rebase fork onto upstream/main (v1.103.0) #15

Closed
codinget wants to merge 670 commits from webnet into save/webnet-2026-07-29
2 changed files with 25 additions and 6 deletions
Showing only changes of commit 5d8f401956 - Show all commits
+8 -6
View File
@@ -367,12 +367,14 @@ func (m *Manager) compileConfig(cfg Config) (rcfg resolver.Config, ocfg OSConfig
// workaround.
isWindows := m.goos == "windows"
isApple := (m.goos == "darwin" || m.goos == "ios")
if len(cfg.singleResolverSet()) > 0 && m.os.SupportsSplitDNS() && !isWindows && !isApple {
// Split DNS configuration requested, where all split domains
// go to the same resolvers. We can let the OS do it.
ocfg.Nameservers = toIPsOnly(cfg.singleResolverSet())
ocfg.MatchDomains = cfg.matchDomains()
return rcfg, ocfg, nil
if m.os.SupportsSplitDNS() && !isWindows && !isApple {
if srs := toIPsOnly(cfg.singleResolverSet()); len(srs) > 0 {
// Split DNS configuration requested, where all split domains
// go to the same resolvers. We can let the OS do it.
ocfg.Nameservers = srs
ocfg.MatchDomains = cfg.matchDomains()
return rcfg, ocfg, nil
}
}
// Split DNS configuration with either multiple upstream routes,
+17
View File
@@ -957,6 +957,23 @@ func TestManager(t *testing.T) {
},
goos: "windows",
},
{
// Regression test for #19834
name: "single-doh-splitdns-no-magicdns",
in: Config{
Routes: upstreams(
"example.com", "http://100.101.102.103:1234/dns-query"),
},
split: true,
os: OSConfig{
Nameservers: serviceAddr46,
MatchDomains: fqdns("example.com"),
},
rs: resolver.Config{
Routes: upstreams("example.com.", "http://100.101.102.103:1234/dns-query"),
},
goos: "linux",
},
}
trIP := cmp.Transformer("ipStr", func(ip netip.Addr) string { return ip.String() })