package
3.25.0-alpha
Repository: https://github.com/ooni/probe-cli.git
Documentation: pkg.go.dev

# Functions

AllEndpointsForDomain gathers all the endpoints for a given domain from a list of DNSMeasurements, removes duplicates and returns the result.
AllEndpointsForURL is like AllHTTPEndpointsForURL but return simple Endpoints rather than HTTPEndpoints.
AllHTTPEndpointsForURL gathers all the HTTP endpoints for a given URL from a list of DNSMeasurements, removes duplicates and returns the result.
ALPNForHTTPEndpoint selects the correct ALPN for an HTTP endpoint given the network.
HTTPEndpointsToEndpoints convers HTTPEndpoints to Endpoints.
NewArchivalBinaryData builds a new ArchivalBinaryData from an array of bytes.
NewArchivalDNSLookupAnswers creates a list of ArchivalDNSLookupAnswer.
NewArchivalDNSLookupEvent converts a DNSLookupEvent to its archival representation.
NewArchivalDNSLookupEventList converts a list of DNSLookupEvent to a list of ArchivalDNSLookupEvent.
NewArchivalDNSMeasurement converts a DNSMeasurement to an ArchivalDNSMeasurement.
NewArchivalDNSMeasurementList converts a list of DNSMeasurement to a list of ArchivalDNSMeasurement.
NewArchivalDNSRoundTripEvent converts a DNSRoundTripEvent into is archival format.
NewArchivalDNSRoundTripEventList converts a DNSRoundTripEvent list to the corresponding archival format.
NewArchivalEndpointMeasurement converts an EndpointMeasurement to the corresponding archival data format.
NewArchivalHeaders builds a new HeadersList from http.Header.
NewArchivalHTTPEndpointMeasurement converts an HTTPEndpointMeasurement to an ArchivalHTTPEndpointMeasurement.
NewArchivalHTTPEndpointMeasurementList converts a list of HTTPEndpointMeasurement to a list of ArchivalHTTPEndpointMeasurement.
NewArchivalHTTPRoundTripEvent converts an HTTPRoundTrip to its archival format.
NewArchivalHTTPRoundTripEventList converts a list of HTTPRoundTripEvent to a list of ArchivalRoundTripEvent.
NewArchivalMeasurement converts a Measurement to ArchivalMeasurement.
NewArchivalNetworkEvent converts a network event to its archival format.
NewArchivalNetworkEventList converts a list of NetworkEvent to a list of ArchivalNetworkEvent.
NewArchivalQUICTLSHandshakeEvent converts a QUICTLSHandshakeEvent to its archival data format.
NewArchivalQUICTLSHandshakeEventList converts a list of QUICTLSHandshakeEvent to a list of ArchivalQUICTLSHandshakeEvent.
NewArchivalTCPConnect converts a NetworkEvent to an ArchivalTCPConnect.
NewArchivalTCPConnectList converts a list of NetworkEvent to a list of ArchivalTCPConnect.
NewArchivalTHMeasurement creates the archival representation of THMeasurement.
NewArchivalTLSCertList builds a new []ArchivalBinaryData from a list of raw x509 certificates data.
NewArchivalURLMeasurement creates the archival representation of an URLMeasurement data structure.
NewCookieJar is a convenience factory for creating an http.CookieJar that is aware of the effective TLS / public suffix list.
NewEasyTLSConfig creates a new EasyTLSConfig instance.
NewEasyTLSConfigWithServerName creates a new EasyTLSConfig with an already configured value for ServerName.
NewHTTPClient creates a new HTTPClient instance that does not automatically perform redirects.
NewHTTPClientWithRedirects creates a new HTTPClient instance that automatically perform redirects.
NewHTTPGetRequest is a convenience factory for creating a new http.Request using the GET method and the given URL.
NewHTTPRequestHeaderForMeasuring returns an http.Header where the headers are the ones we use for measuring.
NewHTTPRequestWithContext is a convenience factory for creating a new HTTP request with the typical headers we use when performing measurements already set inside of req.Header.
NewMeasurerWithDefaultSettings creates a new Measurer instance using the most default settings.
NewTracingHTTPTransport creates a new HTTPTransport instance with events tracing.
NewTracingHTTPTransportWithDefaultSettings creates a new HTTP transport with tracing capabilities and default settings.
PortFromURL returns the port determined from the URL or an error.
UnmeasuredHTTPEndpoints returns the endpoints whose IP address has been resolved but for which we don't have any measurement inside of the given database.
WrapDialer wraps a dialer.
WrapHTTPTransport creates a new model.HTTPTransport instance using the following configuration: - begin is the conventional "zero time" indicating the moment when the measurement begun; - db is the writable DB into which to write the measurement; - txp is the underlying transport to use; - maxBodySnapshotSize is the max size of the response body snapshot to save: we'll truncate bodies larger than that.
WrapResolver wraps a resolver.

# Constants

DefaultDNSLookupTimeout is the default DNS lookup timeout.
DefaultHTTPMaxBodySnapshotSize is the default size used when saving HTTP body snapshots.
DefaultHTTPRoundTripTimeout is the default HTTP round-trip timeout.
DefaultQUICHandshakeTimeout is the default QUIC handshake timeout.
DefaultTCPConnectTimeout is the default TCP connect timeout.
DefaultTLSHandshakeTimeout is the default TLS handshake timeout.
NetworkTCP identifies endpoints using TCP.
NetworkUDP identifies endpoints using UDP.

# Variables

ErrCannotDeterminePortFromURL indicates that we could not determine the correct port from the URL authority and scheme.
ErrHTTPTooManyRedirects is the unexported error that the standard library would return when hitting too many redirects.
ErrUnknownHTTPEndpointNetwork means that the given endpoint's network is of a type that we don't know how to handle.
NewFailure is an alias for measurexlite.NewFailure.
NewOperationLogger is an alias for measurex.NewOperationLogger.
This enumeration lists all known oddities.
dns.lookup.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
quic.handshake.
http.status.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
tcp.connect.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
tls.handshake.
This enumeration lists all known oddities.
This enumeration lists all known oddities.
ResolverForeign is a resolver that is not managed by this package.
ResolverSystem is the system resolver (i.e., getaddrinfo).
ResolverUDP is a resolver using DNS-over-UDP.

# Structs

ArchivalBinaryData is the archival format for binary data.
ArchivalDNSLookupAnswer is the archival format of a DNS lookup answer according to df-002-dnst.
ArchivalDNSLookupEvent is the archival data format of a DNS lookup according to df-002-dnst.
ArchivalDNSMeasurement is the archival representation of DNSMeasurement.
ArchivalDNSRoundTripEvent is the OONI data format representation of a DNS round trip, which is currently not specified.
ArchivalEndpointMeasurement is the archival representation of EndpointMeasurement.
ArchivalHTTPEndpointMeasurement is the archival representation of an HTTPEndpointMeasurement.
ArchivalHTTPRequest is the archival format of an HTTP request according to df-001-http.md.
ArchivalHTTPResponse is the archival format of an HTTP response according to df-001-http.md.
ArchivalHTTPRoundTripEvent is the archival format of an HTTP response according to df-001-http.md.
ArchivalMeasurement is the archival representation of a Measurement.
ArchivalNetworkEvent is the OONI data format representation of a network event according to df-008-netevents.
ArchivalQUICTLSHandshakeEvent is the archival data format for a QUIC or TLS handshake event according to df-006-tlshandshake.
ArchivalTCPConnect is the archival form of TCP connect events in compliance with df-005-tcpconnect.
ArchivalTCPConnectStatus contains the status of a TCP connect.
ArchivalTHMeasurement is the archival representation of THMeasurement.
ArchivalURLMeasurement is the archival representation of URLMeasurement.
DNSLookupEvent contains the results of a DNS lookup.
DNSMeasurement is a DNS measurement.
DNSRoundTripEvent contains the result of a DNS round trip.
EasyTLSConfig helps you to generate a *tls.Config.
Endpoint is an endpoint for a domain.
EndpointMeasurement is an endpoint measurement.
HTTPEndpoint is an HTTP/HTTPS/HTTP3 endpoint.
HTTPEndpointMeasurement is an HTTP endpoint measurement.
HTTPRedirectEvent records an HTTP redirect.
HTTPRequest is the HTTP request.
HTTPResponse is the HTTP response.
HTTPRoundTripEvent contains information about an HTTP round trip.
HTTPTransportDB is an implementation of HTTPTransport that writes measurement events into a WritableDB.
Measurement groups all the events that have the same MeasurementID.
MeasurementDB is a WritableDB that also allows high-level code to generate a Measurement from all the saved events.
Measurer performs measurements.
NetworkEvent contains a network event.
QUICTLSHandshakeEvent contains a QUIC or TLS handshake event.
ResolverInfo contains info about a DNS resolver.
THMeasurement is the measurement performed by the TH.
URLMeasurement is the measurement of a whole URL.

# Interfaces

MeasureURLHelper is a Test Helper that discovers additional endpoints after MeasureURL has finished discovering endpoints via the usual DNS mechanism.
WritableDB is an events "database" in which networking code (e.g., Dialer) can save measurement events (e.g., the result of a connect, a TLS handshake, a read).

# Type aliases

ArchivalHeaders is a list of HTTP headers.
Conn is a network connection.
EndpointNetwork is the network of an endpoint.
Oddity is an unexpected result on the probe or or test helper side during a measurement.
OperationLogger is an alias for measurex.OperationLogger.
ResolverNetwork identifies the network of a resolver.