Socket
Socket
Sign inDemoInstall

dns-over-https

Package Overview
Dependencies
62
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dns-over-https

Resolve DNS records via the Google Public DNS HTTPS API


Version published
Weekly downloads
8
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

dns-over-https

Build Status npm version Download Total

Resolve DNS records via the Google Public DNS HTTPS API

Google Public DNS docs

Installation

yarn add dns-over-https

Usage

import resolveRecord from 'dns-over-https';
import caw from 'caw';

(async () => {
  const a = await resolveRecord('google.com'); // resolves for A records

  const aaaa = await resolveRecord('google.com', 'AAAA'); // resolves for AAAA records

  const txt = await resolveRecord('google.com', 'TXT', {
    disableDNSSEC: true,
    EDNSClientSubnet: '0.0.0.0/0',

    // allows you to pass additional request headers
    headers: {
      'user-agent': 'custom'
    },

    // allows you to pass additional request options
    requestOptions: {
      agent: caw({ protocol: 'https' }) // enables proxy support
    }
  });
})();

Keywords

FAQs

Last updated on 09 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc