0.1.0 • Published 5 years ago
dohc v0.1.0
dohc
Dead simple DNS-over-HTTPS (DoH) client
Installation
npm -g install dohcUsage
const dohc = require('dohc');let ip = await dohc('github.com');DoH provider
To perform the request against a different DoH provider (default is
Cloudflare, as
specified in config.json as DEFAULT_DOH_PROVIDER):
let ip = await dohc('github.com', {
provider: 'dns.google/resolve'
});Record types
To request a different DNS record type (default is A, specified in
config.json as DEFAULT_RECORD_TYPE):
let ip = await dohc('github.com', {
type: 'AAAA'
});Raw JSON response
To return the raw JSON response from the DoH provider:
let json = await dohc('github.com', {
raw: true
});Command line
dohc github.com [--provider PROVIDER] [--type TYPE] [--raw]License
This software is released under the terms of the MIT license. See LICENSE.