chore(dns): remove Mullvad DNS providers (#5057)

* chore(dns): remove Mullvad DNS providers

Mullvad is shutting down its public encrypted DNS servers and sponsoring
Quad9 instead, so the six Mullvad profiles would resolve nothing once the
servers go dark.

Drops the Mullvad entries from config/dns.json, trims them out of the
WPFchangedns ComboItems, and removes the matching bullets and the
DoH-fallback note from the tweaks guide. Quad9 already ships as a provider,
so users have a documented destination.

The generated code-reference page for this tweak is left alone; the
pre-release workflow regenerates it from config/tweaks.json.

* test(dns): use generic fixtures for DoH-only providers

The DoH-only and SecondaryDohTemplate paths in Set-WinUtilDNS were covered
by fixtures named after Mullvad and carrying its real resolver addresses.
Those code paths still exist, so the coverage stays; only the naming was
tied to a provider WinUtil no longer ships.

Renames the fixtures to DohOnlyProvider and DohOnlyNoSecondary and swaps in
RFC 5737 / RFC 3849 documentation addresses and example.com templates, so
the tests no longer read as if they exercise a shipped provider.
This commit is contained in:
Omar
2026-09-19 17:21:27 -05:00
committed by GitHub
parent 2a73455872
commit 91a4f62068
4 changed files with 24 additions and 86 deletions
+23 -23
View File
@@ -53,22 +53,22 @@ Describe "Set-WinUtilDNS" {
Secondary6 = "2606:4700:4700::1001"
DohTemplate = "https://cloudflare-dns.com/dns-query"
}
Mullvad = [pscustomobject]@{
Primary = "194.242.2.2"
Secondary = "194.242.2.3"
Primary6 = "2a07:e340::2"
Secondary6 = "2a07:e340::3"
DohOnlyProvider = [pscustomobject]@{
Primary = "192.0.2.1"
Secondary = "192.0.2.2"
Primary6 = "2001:db8::1"
Secondary6 = "2001:db8::2"
DohOnly = $true
DohTemplate = "https://dns.mullvad.net/dns-query"
SecondaryDohTemplate = "https://adblock.dns.mullvad.net/dns-query"
DohTemplate = "https://doh.example.com/dns-query"
SecondaryDohTemplate = "https://secondary.doh.example.com/dns-query"
}
MullvadNoSecondary = [pscustomobject]@{
Primary = "194.242.2.2"
DohOnlyNoSecondary = [pscustomobject]@{
Primary = "192.0.2.1"
Secondary = ""
Primary6 = "2a07:e340::2"
Primary6 = "2001:db8::1"
Secondary6 = ""
DohOnly = $true
DohTemplate = "https://dns.mullvad.net/dns-query"
DohTemplate = "https://doh.example.com/dns-query"
}
}
}
@@ -151,58 +151,58 @@ Describe "Set-WinUtilDNS" {
}
It "filters empty DNS server addresses" {
Set-WinUtilDNS -DNSProvider "MullvadNoSecondary"
Set-WinUtilDNS -DNSProvider "DohOnlyNoSecondary"
Should -Invoke -CommandName Set-DnsClientServerAddress -Times 1 -Exactly -ParameterFilter {
$InterfaceIndex -eq 7 -and
$ServerAddresses.Count -eq 1 -and
$ServerAddresses[0] -eq "194.242.2.2"
$ServerAddresses[0] -eq "192.0.2.1"
}
Should -Invoke -CommandName Set-DnsClientServerAddress -Times 1 -Exactly -ParameterFilter {
$InterfaceIndex -eq 7 -and
$ServerAddresses.Count -eq 1 -and
$ServerAddresses[0] -eq "2a07:e340::2"
$ServerAddresses[0] -eq "2001:db8::1"
}
Should -Invoke -CommandName Add-DnsClientDohServerAddress -Times 2 -Exactly
}
It "applies the matching DoH template to secondary resolvers" {
Set-WinUtilDNS -DNSProvider "Mullvad"
Set-WinUtilDNS -DNSProvider "DohOnlyProvider"
Should -Invoke -CommandName Add-DnsClientDohServerAddress -Times 2 -Exactly -ParameterFilter {
$ServerAddress -in @("194.242.2.2", "2a07:e340::2") -and
$DohTemplate -eq "https://dns.mullvad.net/dns-query"
$ServerAddress -in @("192.0.2.1", "2001:db8::1") -and
$DohTemplate -eq "https://doh.example.com/dns-query"
}
Should -Invoke -CommandName Add-DnsClientDohServerAddress -Times 2 -Exactly -ParameterFilter {
$ServerAddress -in @("194.242.2.3", "2a07:e340::3") -and
$DohTemplate -eq "https://adblock.dns.mullvad.net/dns-query"
$ServerAddress -in @("192.0.2.2", "2001:db8::2") -and
$DohTemplate -eq "https://secondary.doh.example.com/dns-query"
}
}
It "does not apply a DoH-only provider when DoH is unsupported" {
Mock Get-Command { return $null } -ParameterFilter { $Name -eq "Add-DnsClientDohServerAddress" }
$result = Set-WinUtilDNS -DNSProvider "Mullvad"
$result = Set-WinUtilDNS -DNSProvider "DohOnlyProvider"
$result | Should -BeFalse
Should -Invoke -CommandName Set-DnsClientServerAddress -Times 0 -Exactly
Should -Invoke -CommandName Add-DnsClientDohServerAddress -Times 0 -Exactly
Should -Invoke -CommandName Write-Warning -Times 1 -Exactly -ParameterFilter {
$Message -eq "DNS provider Mullvad requires DNS over HTTPS, which is not supported on this system."
$Message -eq "DNS provider DohOnlyProvider requires DNS over HTTPS, which is not supported on this system."
}
}
It "does not change adapter DNS when DoH registration fails" {
Mock Add-DnsClientDohServerAddress { throw "DoH registration failed" }
$result = Set-WinUtilDNS -DNSProvider "Mullvad"
$result = Set-WinUtilDNS -DNSProvider "DohOnlyProvider"
$result | Should -BeFalse
Should -Invoke -CommandName Set-DnsClientServerAddress -Times 0 -Exactly
Should -Invoke -CommandName Write-WinUtilLog -Times 1 -Exactly -ParameterFilter {
$Level -eq "ERROR" -and
$Component -eq "DNS" -and
$Message -like "DNS provider Mullvad was not completed: *"
$Message -like "DNS provider DohOnlyProvider was not completed: *"
}
}