Tools to work with the Google DNS over HTTPS API in R https://cinc.rud.is/web/packages/gdns/
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.

README.Rmd 2.6KB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ---
  2. output: rmarkdown::github_document
  3. ---
  4. <!-- README.md is generated from README.Rmd. Please edit that file -->
  5. ```{r, echo = FALSE}
  6. knitr::opts_chunk$set(
  7. collapse = TRUE,
  8. comment = "#>",
  9. fig.path = "README-"
  10. )
  11. ```
  12. [![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/gdns.svg?branch=master)](https://travis-ci.org/hrbrmstr/gdns)
  13. `gdns` : Tools to work with the Google DNS over HTTPS API
  14. 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.
  15. 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.
  16. More info at <https://developers.google.com/speed/public-dns/docs/dns-over-https>.
  17. The following functions are implemented:
  18. - `bulk_query`: Vectorized query, returning only answers in a data frame
  19. - `has_spf`: Test for whether a DNS TXT record is an SPF record
  20. - `is_hard_fail`: SPF "all" type test
  21. - `is_soft_fail`: SPF "all" type test
  22. - `passes_all`: SPF "all" type test
  23. - `query`: Perform DNS over HTTPS queries using Google
  24. - `spf_exists`: SPF field extraction functions
  25. - `spf_includes`: SPF field extraction functions
  26. - `spf_ipv4s`: SPF field extraction functions
  27. - `spf_ipv6s`: SPF field extraction functions
  28. - `spf_ptrs`: SPF field extraction functions
  29. - `split_spf`: Split out all SPF records in a domain's TXT record
  30. ### Installation
  31. ```{r eval=FALSE}
  32. devtools::install_github("hrbrmstr/gdns")
  33. ```
  34. ```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
  35. options(width=120)
  36. ```
  37. ### Usage
  38. ```{r}
  39. library(gdns)
  40. # current verison
  41. packageVersion("gdns")
  42. str(query("rud.is"))
  43. str(query("example.com", "255")) # "ANY" query
  44. str(query("microsoft.com", "MX"))
  45. str(query("google-public-dns-a.google.com", "TXT"))
  46. str(query("apple.com"))
  47. str(query("17.142.160.59", "PTR"))
  48. hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com")
  49. gdns::bulk_query(hosts)
  50. ```
  51. ### Test Results
  52. ```{r}
  53. library(gdns)
  54. library(testthat)
  55. date()
  56. test_dir("tests/")
  57. ```
  58. ### Code of Conduct
  59. Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
  60. By participating in this project you agree to abide by its terms.