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 2301a30630...60b7d1f87b 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
commit c9943dff38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 3 deletions

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"`
}