@leichtgewicht/dnsstamp
v1.1.4
Published
DNS Stamp de/encoder
Downloads
72
Maintainers
Readme
@leichtgewicht/dnsstamp
@leichtgewicht/dnsstamp
is a fork of dnsstamp with the PR
- https://github.com/rs/node-dnsstamp/pull/1
merged in.
DNS Stamp
This node module provides a simple API to parse and generate DNS Stamp as defined by Frank Denis.
Installation
npm install dnsstamp
Usage
Parse a stamp URL:
const DNSStamp = require('dnsstamp');
let stamp = DNSStamp.parse(sdns);
Create a stamp URL:
const DNSStamp = require('dnsstamp');
let stamp = new DNSStamp.DNSCrypt(addr, {
pk: pk,
providerName: providerName,
});
let sdns = stamp.toString();
Supported stamps:
DNSStamp.DNSCrypt
: constructor(addr
, {props
,pk
,providerName
})DNSStamp.DOH
: constructor(addr
, {props
,hostName
,hash
,path
})DNSStamp.DOT
: constructor(addr
, {props
,hostName
,hash
})DNSStamp.Plain
: constructor(addr
, {props
})
Licenses
All source code is licensed under the MIT License.