Browse Source

user agent

boB Rudis 5 months ago
parent
commit
aa1211842b
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions
  1. 8
    0
      R/aaa.R
  2. 1
    0
      R/doh-query.R

+ 8
- 0
R/aaa.R View File

@@ -90,3 +90,11 @@ dlv = 32769
90 90
 )
91 91
 
92 92
 rr_types_rev <- set_names(names(rr_types), as.character(rr_types))
93
+
94
+httr::user_agent(
95
+  sprintf(
96
+    "clandnstine package v%s: (<%s>)",
97
+    utils::packageVersion("clandnstine"),
98
+    utils::packageDescription("clandnstine")$URL
99
+  )
100
+) -> .CLANDNSTINE_UA

+ 1
- 0
R/doh-query.R View File

@@ -27,6 +27,7 @@ doh_post <- function(name, type = "A", server_path = "https://dns.quad9.net/dns-
27 27
       `Content-Type` = "application/dns-message",
28 28
       `Accept` = "application/dns-message"
29 29
     ),
30
+    .CLANDNSTINE_UA,
30 31
     encode = "raw",
31 32
     body = q$pack()
32 33
   ) -> res

Loading…
Cancel
Save