gavinhungry / dohc

DNS-over-HTTPS (DoH) client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dohc

DNS-over-HTTPS (DoH) client

Usage

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.

About

DNS-over-HTTPS (DoH) client

License:MIT License


Languages

Language:JavaScript 100.0%