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.

63 lines
2.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/gdns.r
  3. \name{query}
  4. \alias{query}
  5. \title{Perform DNS over HTTPS queries using Google}
  6. \usage{
  7. query(name, type = "1", edns_client_subnet = "0.0.0.0/0")
  8. }
  9. \arguments{
  10. \item{name}{item to lookup. Valid characters are numbers, letters, hyphen, and dot. Length
  11. must be between 1 and 255. Names with escaped or non-ASCII characters
  12. are not supported. Internationalized domain names must use the
  13. punycode format (e.g. "\code{xn--qxam}").\cr
  14. \cr If an IPv4 string is input, it will be transformed into
  15. a proper format for reverse lookups.}
  16. \item{type}{RR type can be represented as a number in [1, 65535] or canonical
  17. string (A, aaaa, etc). More information on RR types can be
  18. found \href{http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4}{here}.
  19. You can use \code{255} for an \code{ANY} query.}
  20. \item{edns_client_subnet}{The edns0-client-subnet option. Format is an IP
  21. address with a subnet mask. Examples: \code{1.2.3.4/24},
  22. \code{2001:700:300::/48}.\cr
  23. If you are using DNS-over-HTTPS because of privacy concerns, and do
  24. not want any part of your IP address to be sent to authoritative
  25. nameservers for geographic location accuracy, use
  26. \code{edns_client_subnet=0.0.0.0/0}. Google Public DNS normally sends
  27. approximate network information (usually replacing the last part of
  28. your IPv4 address with zeroes). \code{0.0.0.0/0} is the default.}
  29. }
  30. \value{
  31. a \code{list} with the query result or \code{NULL} if an error occurred
  32. }
  33. \description{
  34. Traditional DNS queries and responses are sent over UDP or TCP without
  35. encryption. This is vulnerable to eavesdropping and spoofing (including
  36. DNS-based Internet filtering). Responses from recursive resolvers to clients
  37. are the most vulnerable to undesired or malicious changes, while
  38. communications between recursive resolvers and authoritative nameservers
  39. often incorporate additional protection.\cr
  40. \cr
  41. To address this problem, Google Public DNS offers DNS resolution over an
  42. encrypted HTTPS connection. DNS-over-HTTPS greatly enhances privacy and
  43. security between a client and a recursive resolver, and complements DNSSEC
  44. to provide end-to-end authenticated DNS lookups.
  45. }
  46. \details{
  47. To perform vectorized queries with only answers (and no metadata) use
  48. \code{bulk_query()}).
  49. }
  50. \examples{
  51. query("rud.is")
  52. query("example.com", "255") # ANY query
  53. query("microsoft.com", "MX")
  54. query("google-public-dns-a.google.com", "TXT")
  55. query("apple.com")
  56. query("17.142.160.59", "PTR")
  57. }
  58. \references{
  59. \url{https://developers.google.com/speed/public-dns/docs/dns-over-https}
  60. }