num-client
Advanced tools
Comparing version 1.0.15 to 1.0.16
{ | ||
"name": "num-client", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "A NUM Protocol Client in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -96,9 +96,12 @@ # NUM Client | ||
## Overriding the Default DoH Endpoint | ||
By default the `NUMClient` uses the Google DoH resolver, although it can be changed if required by providing a `DoHResolver` to a service that supports [the JSON API for DNS over HTTPS (DoH)](https://developers.google.com/speed/public-dns/docs/doh/json).: | ||
By default the `NUMClient` uses the Cloudflare and Quad9 DoH resolvers, although it can be changed if required by providing a `DoHResolver` to a service that supports [the JSON API for DNS over HTTPS (DoH)](https://developers.google.com/speed/public-dns/docs/doh/json).: | ||
```Typescript | ||
const lookup = async () => { | ||
// ... | ||
const DEFAULT_RESOLVER = new DoHResolver('Google', 'https://dns.google.com/resolve'); | ||
const DEFAULT_RESOLVERS = [ | ||
new DoHResolver('Cloudflare', 'https://cloudflare-dns.com/dns-query'), | ||
new DoHResolver('Quad9', 'https://dns10.quad9.net:5053/dns-query'), | ||
]; | ||
const client = createClient([DEFAULT_RESOLVER]); // Use a custom DoH service | ||
const client = createClient(DEFAULT_RESOLVERS); // Use a custom DoH service | ||
// ... | ||
@@ -168,5 +171,8 @@ }; | ||
const DEFAULT_RESOLVER = new num.DoHResolver('Cloudflare', 'https://cloudflare-dns.com/dns-query'); | ||
const DEFAULT_RESOLVERS = [ | ||
new DoHResolver('Cloudflare', 'https://cloudflare-dns.com/dns-query'), | ||
new DoHResolver('Quad9', 'https://dns10.quad9.net:5053/dns-query'), | ||
]; | ||
const client = num.createClient([DEFAULT_RESOLVER]); | ||
const client = num.createClient(DEFAULT_RESOLVERS); | ||
@@ -173,0 +179,0 @@ const ctx1 = client.createContext(numUri1); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506785
265