# Functions
BlockpageHandlerFactory returns a blockpage regardless of the incoming domain.
CloudflareCAPTCHAHandler returns the [http.Handler] for cloudflare CAPTCHAs.
CloudflareCAPTCHAHandlerFactory implements cloudflare CAPTCHAs.
ExampleWebPageHandler returns a handler returning a webpage similar to example.org's one when the domain is www.example.{com,org} and redirecting to www.
ExampleWebPageHandlerFactory returns a webpage similar to example.org's one when the domain is www.example.{com,org} and redirects to www.example.{com,org} when it is example.{com,org}.
HTTPBinHandler returns the [http.Handler] implementing an httpbin.com-like service.
HTTPBinHandlerFactory constructs an [HTTPBinHandler].
LargeFileHandler returns an [http.Handler] that returns a 32 MiB file.
LargeFileHandlerFactory returns an [HTTPHandlerFactory] for constructing a [LargeFileHandler].
MustNewQAEnv creates a new [QAEnv].
MustNewScenario constructs a complete testing scenario using the domains and IP addresses contained by the given [ScenarioDomainAddresses] array.
NewTCPEchoServerFactory is a [NetStackServerFactory] for the TCP echo service.
NewTLSProxyServerFactory is a [NetStackServerFactory] for the TCP echo service.
QAEnvOptionClientAddress sets the client IP address.
QAEnvOptionClientNICWrapper sets the NIC wrapper for the client.
QAEnvOptionLogger sets the logger to use.
QAEnvOptionNetStack creates an userspace network stack with the given IP address and binds it to the given factory, which will be responsible to create listening sockets and closing them when we're done running.
URLShortenerFactory returns an [HTTPHandlerFactory] that eventually redirects requests using the map provided as argument or returns 404.
WithCustomTProxy executes the given function using the given [netem.UnderlyingNetwork] as the [model.UnderlyingNetwork] used by the [netxlite] package.
YandexHandler returns the [http.Handler] for yandex.com.
YandexHandlerFactory implements yandex.com.
# Constants
AddressApiOONIIo is the IP address for api.ooni.io.
AddressBadSSLCom is the IP address of badssl.com.
AddressBitly is the IP address of bitly.com.
AddressCloudflareCache1 is the first address associated with cloudflare caches.
AddressCloudflareDNSCom1001 is the 1.0.0.1 adress.
AddressCloudflareDNSCom1111 is the 1.1.1.1 adress.
AddressDNSGoogle8844 is the 8.8.4.4 address for dns.google.
AddressDNSGoogle8888 is the 8.8.8.8 address for dns.google.
AddressDNSQuad9Net9999 is the IP address for dns.quad9.net.
AddressDNSQuad9NetOther is the the other IP address for dns.quad9.net.
AddressGeoIPUbuntuCom is the IP address for geoip.ubuntu.com.
AddressHTTPBinCom1 is the first address associated an httpbin.com-like service which our QA environment exports as httpbin.com.
AddressLargeFileCom1 is the first address associated with largefile.com.
AddressMozillaCloudflareDNSCom is the IP address for mozilla.cloudflare-dns.com.
AddressNextDNSIo is a dns.nextdns.io address.
AddressOneThOONIOrg is the IP address for 1.th.ooni.org.
AddressOpenDNS220 is the 208.67.220.220 opendns.com address.
AddressOpenDNS222 is the 208.67.222.222 opendns.com address.
AddressPublicBlockpage is the IP address we use for modeling a public IP address that is serving blockpages to its users.
AddressTHCloudfront is the IP address for d33d1gs9kpq1c5.cloudfront.net.
AddressThreeThOONIOrg is the IP address for 3.th.ooni.org.
AddressTwoThOONIOrg is the IP address for 2.th.ooni.org.
AddressWwwExampleCom is the IP address for www.example.com.
AddressYandexCom1 is the first address associated with yandex.com.
AddressZeroThOONIOrg is the IP address for 0.th.ooni.org.
Blockpage is the webpage returned by [BlockpageHandlerFactory].
DefaultClientAddress is the default client IP address.
ExampleWebPage is the webpage returned by [ExampleWebPageHandlerFactory].
ISPProxyAddress is the IP address of the ISP's HTTP transparent proxy.
ISPResolverAddress is the IP address of the client ISP resolver.
RootResolverAddress is the root resolver resolver IP address.
ScenarioRoleBadSSL means that the host hosts services to measure against common TLS issues.
ScenarioRoleBlockpageServer means we should serve a blockpage using HTTP.
ScenarioRoleOONIAPI means we should instantiate the OONI API.
ScenarioRoleOONITestHelper means we should instantiate the oohelperd.
ScenarioRoleProxy means the host is a transparent proxy.
ScenarioRolePublicDNS means we should create DNS-over-HTTPS and DNS-over-UDP servers.
ScenarioRoleUbuntuGeoIP means we should instantiate the Ubuntu geoip service.
ScenarioRoleURLShortener means that the host is an URL shortener.
ScenarioRoleWebServer means we should instantiate a webserver using a specific factory.
# Variables
DefaultURLShortenerMapping is the default URL shortener mapping we use.
InternetScenario contains the domains and addresses used by [NewInternetScenario].
# Structs
BadSSLServerFactory is a [NetStackServerFactory] that instantiates a [NetStackServer] used for testing common TLS issues.
DNSOverHTTPSHandlerFactory is a [QAEnvHTTPHandlerFactory] for [testingx.GeoIPHandlerUbuntu].
DNSOverUDPServerFactory implements [NetStackServerFactory] for DNS-over-UDP servers.
GeoIPHandlerFactoryUbuntu is a [QAEnvHTTPHandlerFactory] for [testingx.GeoIPHandlerUbuntu].
HTTP3ServerFactory implements [NetStackServerFactory] for HTTP-over-TLS (i.e., HTTPS).
HTTPCleartextServerFactory implements [NetStackServerFactory] for cleartext HTTP.
HTTPSecureServerFactory implements [NetStackServerFactory] for HTTP-over-TLS (i.e., HTTPS).
OOAPIHandler is an [http.Handler] implementing the OONI API.
OOAPIHandlerFactory is a [QAEnvHTTPHandlerFactory] that creates [OOAPIHandler] instances.
OOHelperDFactory is the factory to create an [http.Handler] implementing the OONI Web Connectivity test helper using a specific [netem.UnderlyingNetwork].
QAEnv is the environment for running QA tests using [github.com/ooni/netem].
ScenarioDomainAddresses describes a domain and address used in a scenario.
# Interfaces
HTTPHandlerFactory constructs an [http.Handler].
NetStackServer handles the lifecycle of a server using a TCP/IP stack in userspace.
NetStackServerFactory constructs a new [NetStackServer].
NetStackServerFactoryEnv is [NetStackServerFactory] view of [*QAEnv].
# Type aliases
HTTPHandlerFactoryFunc allows a func to become an [HTTPHandlerFactory].
QAEnvOption is an option to modify [NewQAEnv] default behavior.