kopia lustrzana https://gitlab.com/rysiekpl/libresilient
dnslink-fetch: using Hostux DoH JSON API endpoint by default now
Thanks to https://hostux.social/@valere: https://hostux.social/@valere/109211704321033926merge-requests/23/head
rodzic
7b63724419
commit
ee10bba97a
|
@ -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`"
|
||||
|
|
|
@ -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"));
|
||||
|
|
Ładowanie…
Reference in New Issue