Crates.io | dnsoverhttps |
lib.rs | dnsoverhttps |
version | 0.6.0 |
source | src |
created_at | 2018-02-06 19:53:49.712032 |
updated_at | 2018-09-20 22:14:23.672268 |
description | Resolve hostnames by sending DNS queries over HTTPS |
homepage | https://github.com/badboy/dnsoverhttps |
repository | https://github.com/badboy/dnsoverhttps |
max_upload_size | |
id | 49899 |
size | 14,486 |
Resolve hostnames by sending DNS queries over HTTPS.
It uses https://1.1.1.1
as the DNS resolver by default, hosted by Cloudflare.
According to Cloudflare it is a privacy-first consumer DNS service.
See https://1.1.1.1 for more information.
Based on https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-07.
let addr = dnsoverhttps::resolve_host("example.com");
let client = dnsoverhttps::Client::from_url_with_hostname("https://172.217.21.110/experimental", "dns.google.com".to_string()).unwrap();
let addr = client.resolve_host("example.com");
dnsoverhttps
comes with a small CLI utility providing host
functionality to resolve hostnames:
$ host example.com
example.com has address 2606:2800:220:1:248:1893:25c8:1946
example.com has address 93.184.216.34
To install:
cargo install dnsoverhttps
MIT. See LICENSE.