Skip to content

curl/doh

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

- Return 0 on doh_encode error. This makes the values returned on error
  by doh_encode() consistent with the post-invocation test.

Prior to this change doh_encode, which returns a size_t of bytes
written on success, erroneously returned DOHcodes on error
(eg DOH_TOO_SMALL_BUFFER (4), ie 4 bytes written, which was wrong).

Fixes #40
Closes #41
8654bc9

Git stats

Files

Permalink
Failed to load latest commit information.

doh

Build Status

A libcurl-using application that resolves a host name using DNS-over-HTTPS (DoH).

This code uses POST requests unconditionally for this.

Install

make
sudo make install

Usage

doh [options] host [DoH URL]

If DoH URL is left out, the Cloudflare DoH server will be used. See also list of public servers

Examples

$ doh www.example.com
www.example.com from https://dns.cloudflare.com/dns-query
TTL: 2612 seconds
A: 93.184.216.34
AAAA: 2606:2800:0220:0001:0248:1893:25c8:1946

$ doh www.yahoo.com https://dns.google/dns-query
www.yahoo.com from https://dns.google/dns-query
TTL: 36 seconds
A: 87.248.98.8
A: 87.248.98.7
AAAA: 2a00:1288:0110:001c:0000:0000:0000:0004
AAAA: 2a00:1288:0110:001c:0000:0000:0000:0003
CNAME: atsv2-fp.wg1.b.yahoo.com
CNAME: atsv2-fp.wg1.b.yahoo.com