dnslink-fetch: using Hostux DoH JSON API endpoint by default now

Thanks to https://hostux.social/@valere:
https://hostux.social/@valere/109211704321033926
merge-requests/18/merge
Michał 'rysiek' Woźniak 2022-10-22 11:52:38 +00:00
rodzic 7b63724419
commit ee10bba97a
2 zmienionych plików z 15 dodań i 7 usunięć

Wyświetl plik

@ -17,8 +17,10 @@ The `dnslink-fetch` plugin supports the following configuration options:
Number of alternative endpoints to attempt fetching from simultaneously.
If the number of available alternative endpoints is *lower* then `concurrency`, all are used for each request. If it is *higher*, only `concurrency` of them, chosen at random, are used for any given request.
- `dohProvider` (default: "`https://dns.google/resolve`")
DNS-over-HTTPS JSON API provider/endpoint to query when resolving the DNSLink. By default using Google's DoH provider. Other options:
- `dohProvider` (default: "`https://dns.hostux.net/dns-query`")
DNS-over-HTTPS JSON API provider/endpoint to query when resolving the DNSLink. By default using [Hostux DoH endpoint](https://dns.hostux.net/en/). Other options:
- "`https://dns.google/resolve`"
Google DNS DoH JSON API endpoint
- "`https://cloudflare-dns.com/dns-query`"
CloudFlare's DoH JSON API endpoint
- "`https://mozilla.cloudflare-dns.com/dns-query`"

Wyświetl plik

@ -31,10 +31,15 @@
concurrency: 3,
// DNS-over-HTTPS JSON API provider
// using Google's DoH provider; other options:
// 'https://cloudflare-dns.com/dns-query'
// 'https://mozilla.cloudflare-dns.com/dns-query'
dohProvider: 'https://dns.google/resolve',
//
// by default using Hostux DoH provider, info here:
// - https://dns.hostux.net/en/
//
// other known DoH JSON API providers:
// - 'https://cloudflare-dns.com/dns-query'
// - 'https://mozilla.cloudflare-dns.com/dns-query'
// - 'https://dns.google/resolve'
dohProvider: 'https://dns.hostux.net/dns-query',
// should the EDNS Client Subnet be masked from authoritative DNS servers for privacy?
// - https://en.wikipedia.org/wiki/EDNS_Client_Subnet
@ -109,7 +114,8 @@
}
// filter by 'dnslink="/https?/', morph into scheme://...
let re = /^dnslink=\/(https?)\/(.+)/
// we can't rely on the data not to be wrapped in quotation marks, so we need to correct for that too
let re = /^"?dnslink=\/(https?)\/([^"]+)"?$/
response = response
.filter(r => re.test(r))
.map(r => r.replace(re, "$1:\/\/$2"));