# dns-over-https

> Resolve DNS records via the Google Public DNS HTTPS API

Latest version **0.1.0** (published 2018-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install dns-over-https
pnpm add dns-over-https
yarn add dns-over-https
bun add dns-over-https
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-01-09 |
| First published | 2018-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jan Buschtöns |
| Maintainers | buschtoens |
| Keywords | dns, https, resolve, google, public, proxy |

## Links

- npm: https://www.npmjs.com/package/dns-over-https
- Repository: https://github.com/buschtoens/dns-over-https
- npm.io page: https://npm.io/package/dns-over-https

## Dependencies (2)

- [get-stream](https://npm.io/package/get-stream.md) ^3.0.0
- [env-proxy-agent](https://npm.io/package/env-proxy-agent.md) ^0.1.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-01-09
- 0.0.0 — 2018-01-08

## README

# dns-over-https

[![Build Status](https://travis-ci.org/buschtoens/dns-over-https.svg)](https://travis-ci.org/buschtoens/dns-over-https)
[![npm version](https://badge.fury.io/js/dns-over-https.svg)](http://badge.fury.io/js/dns-over-https)
[![Download Total](https://img.shields.io/npm/dt/dns-over-https.svg)](http://badge.fury.io/js/dns-over-https)

Resolve DNS records via the [Google Public DNS HTTPS API](https://dns.google.com/query)

[Google Public DNS docs](https://developers.google.com/speed/public-dns/docs/dns-over-https)

## Installation

```
yarn add dns-over-https
```

## Usage

```js
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
    }
  });
})();
```

---
_Source: https://npm.io/package/dns-over-https · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
