Tools to work with the Google DNS over HTTPS API in R
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.3 KiB

output: rmarkdown::github_document
chunk_output_type: console

<!-- is generated from README.Rmd. Please edit that file -->

```{r include=FALSE}
message = FALSE,
warning = FALSE,
fig.retina = 2

[![Travis-CI Build Status](](

# gdns

Tools to work with the Google DNS over HTTPS (DoH) API

## Description

Traditional DNS queries and responses are sent over UDP or TCP without encryption. This is vulnerable to eavesdropping and spoofing (including DNS-based Internet filtering). Responses from recursive resolvers to clients are the most vulnerable to undesired or malicious changes, while communications between recursive resolvers and authoritative nameservers often incorporate additional protection.

To address this problem, Google Public DNS offers DNS resolution over an encrypted HTTPS connection. DNS-over-HTTPS greatly enhances privacy and security between a client and a recursive resolver, and complements DNSSEC to provide end-to-end authenticated DNS lookups.

More info at <>.

The following functions are implemented:


- `query` / `dig`: Perform DNS over HTTPS queries using Google
- `bulk_query`: Vectorized query, returning only answers in a data frame
- ``: Coerce a gdns query response answer to a data frame


- `has_spf`: Test for whether a DNS TXT record is an SPF record
- `is_hard_fail`: SPF "all" type test
- `is_soft_fail`: SPF "all" type test
- `passes_all`: SPF "all" type test
- `spf_exists`: SPF field extraction functions
- `spf_includes`: SPF field extraction functions
- `spf_ipv4s`: SPF field extraction functions
- `spf_ipv6s`: SPF field extraction functions
- `spf_ptrs`: SPF field extraction functions
- `split_spf`: Split out all SPF records in a domain's TXT record

IANA Datasets:

- `dns_classes`: DNS CLASSes (dataset)
- `dns_glob_names`: Underscored and Globally Scoped DNS Node Names (dataset)
- `dns_opcodes`: DNS OpCodes (dataset)
- `dns_rcodes`: DNS RCODEs (dataset)
- `edns0_option_codes`: DNS EDNS0 Option Codes (OPT) (dataset)
- `rrtypes`: Resource Record (RR) TYPEs (dataset)

### Installation

Any of the following:

```{r eval=FALSE}
install("gdns", repos = "")

```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}

### Usage

library(tibble) # for printing

# current verison


query("") %>%

str(dig("", "255")) # "ANY" query

query("", "MX") %>%""))"", "PTR"))

hosts <- c("", "", "", "", "")


## gdns Metrics

```{r cloc, echo=FALSE}

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](
By participating in this project you agree to abide by its terms.