Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

num-client

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

num-client - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

2

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc