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.

81 lines

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/zgdns.r
  3. \name{query}
  4. \alias{query}
  5. \alias{dig}
  6. \title{Perform DNS over HTTPS queries using Google}
  7. \usage{
  8. query(name, type = "1", cd = FALSE, do = FALSE,
  9. edns_client_subnet = "", random_padding = NULL)
  10. dig(name, type = "1", cd = FALSE, do = FALSE,
  11. edns_client_subnet = "", random_padding = NULL)
  12. }
  13. \arguments{
  14. \item{name}{item to lookup. Valid characters are numbers, letters, hyphen, and dot. Length
  15. must be between 1 and 255. Names with escaped or non-ASCII characters
  16. are not supported. Internationalized domain names must use the
  17. punycode format (e.g. "\code{xn--qxam}").\cr
  18. \cr If an IPv4 string is input, it will be transformed into
  19. a proper format for reverse lookups.}
  20. \item{type}{RR type can be represented as a number in [1, 65535] or canonical
  21. string (A, aaaa, etc). More information on RR types can be
  22. found \href{}{here}.
  23. You can use \code{255} for an \code{ANY} query.}
  24. \item{cd}{(Checking Disabled) flag. Use `TRUE` to disable DNSSEC validation;
  25. Default: `FALSE`.}
  26. \item{do}{(DNSSEC OK) flag. Use `TRUE` include DNSSEC records (RRSIG, NSEC, NSEC3);
  27. Default: `FALSE`.}
  28. \item{edns_client_subnet}{The edns0-client-subnet option. Format is an IP
  29. address with a subnet mask. Examples: \code{},
  30. \code{2001:700:300::/48}.\cr
  31. If you are using DNS-over-HTTPS because of privacy concerns, and do
  32. not want any part of your IP address to be sent to authoritative
  33. nameservers for geographic location accuracy, use
  34. \code{edns_client_subnet=}. Google Public DNS normally sends
  35. approximate network information (usually replacing the last part of
  36. your IPv4 address with zeroes). \code{} is the default.}
  37. \item{random_padding}{clients concerned about possible side-channel privacy
  38. attacks using the packet sizes of HTTPS GET requests can use this to
  39. make all requests exactly the same size by padding requests with random data.
  40. To prevent misinterpretation of the URL, restrict the padding characters to
  41. the unreserved URL characters: upper- and lower-case letters, digits,
  42. hyphen, period, underscore and tilde.}
  43. }
  44. \value{
  45. a \code{list} with the query result or \code{NULL} if an error occurred
  46. }
  47. \description{
  48. Traditional DNS queries and responses are sent over UDP or TCP without
  49. encryption. This is vulnerable to eavesdropping and spoofing (including
  50. DNS-based Internet filtering). Responses from recursive resolvers to clients
  51. are the most vulnerable to undesired or malicious changes, while
  52. communications between recursive resolvers and authoritative nameservers
  53. often incorporate additional protection.\cr
  54. \cr
  55. To address this problem, Google Public DNS offers DNS resolution over an
  56. encrypted HTTPS connection. DNS-over-HTTPS greatly enhances privacy and
  57. security between a client and a recursive resolver, and complements DNSSEC
  58. to provide end-to-end authenticated DNS lookups.
  59. }
  60. \details{
  61. To perform vectorized queries with only answers (and no metadata) use
  62. \code{bulk_query()}).
  63. }
  64. \examples{
  65. query("")
  66. dig("", "255") # ANY query
  67. query("", "MX")
  68. dig("", "TXT")
  69. query("")
  70. dig("", "PTR")
  71. }
  72. \references{
  73. <>
  74. }