net/dns/publicdns: support NextDNS DoH URLs with path parameters

Updates #2452

Change-Id: I0f1c34cc1672e87e7efd0adfe4088724dd0de3ed
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-09-09 14:06:06 -07:00
committed by Brad Fitzpatrick
parent b302742137
commit c14361e70e
2 changed files with 13 additions and 0 deletions

View File

@@ -86,6 +86,15 @@ func TestDoHIPsOfBase(t *testing.T) {
"2a07:a8c1::c3:a884",
),
},
{
base: "https://dns.nextdns.io/c3a884/with/more/stuff",
want: ips(
"45.90.28.0",
"45.90.30.0",
"2a07:a8c0::c3:a884",
"2a07:a8c1::c3:a884",
),
},
}
for _, tt := range tests {
got := DoHIPsOfBase(tt.base)