feat(dns): expose more low-level fields (#873)

This pull request started as a draft to enable users to see CNAME answers. It contained several patches which we merged separately (see https://github.com/ooni/probe-cli/pull/873#issuecomment-1222406732 and https://github.com/ooni/probe-cli/compare/2301a30630577637e5ec9912b027584e5ab4eebc...60b7d1f87be4b088929048edfb950dc93146a01f for details on what has actually changed, which is based on patches originally part of this PR). In its final form, however, this PR only deals with exposing more low-level DNS fields to the archival data format.

Closes: https://github.com/ooni/probe/issues/2228

Related PR spec: https://github.com/ooni/spec/pull/256
This commit is contained in:
Simone Basso
2022-08-23 16:12:04 +02:00
committed by GitHub
parent 60b7d1f87b
commit c9943dff38
5 changed files with 68 additions and 3 deletions
+4
View File
@@ -115,11 +115,15 @@ type ArchivalDNSLookupResult struct {
Answers []ArchivalDNSAnswer `json:"answers"`
Engine string `json:"engine"`
Failure *string `json:"failure"`
GetaddrinfoError int64 `json:"getaddrinfo_error,omitempty"`
Hostname string `json:"hostname"`
QueryType string `json:"query_type"`
RawResponse []byte `json:"raw_response,omitempty"`
Rcode int64 `json:"rcode,omitempty"`
ResolverHostname *string `json:"resolver_hostname"`
ResolverPort *string `json:"resolver_port"`
ResolverAddress string `json:"resolver_address"`
T0 float64 `json:"t0"`
T float64 `json:"t"`
}