Documentation ¶
Overview ¶
Package tlsmiddlebox implements the tlsmiddlebox experiment
Spec: https://github.com/ooni/spec/blob/master/nettests/ts-037-tlsmiddlebox.md.
Index ¶
- Variables
- func NewDialerTTLWrapper() model.Dialer
- type CompleteTrace
- type Config
- type Iteration
- type IterativeTrace
- type Measurer
- func (m *Measurer) DNSLookup(ctx context.Context, index int64, zeroTime time.Time, logger model.Logger, ...) ([]string, error)
- func (m *Measurer) ExperimentName() string
- func (m *Measurer) ExperimentVersion() string
- func (m Measurer) GetSummaryKeys(measurement *model.Measurement) (interface{}, error)
- func (m *Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error
- func (m *Measurer) TCPConnect(ctx context.Context, index int64, zeroTime time.Time, logger model.Logger, ...) error
- func (m *Measurer) TLSTrace(ctx context.Context, index int64, zeroTime time.Time, logger model.Logger, ...)
- func (m *Measurer) TraceAddress(ctx context.Context, index int64, zeroTime time.Time, logger model.Logger, ...) error
- type SummaryKeys
- type TestKeys
Constants ¶
This section is empty.
Variables ¶
var ClientIDs = map[int]*utls.ClientHelloID{ 1: &utls.HelloGolang, 2: &utls.HelloChrome_Auto, 3: &utls.HelloFirefox_Auto, 4: &utls.HelloIOS_Auto, }
ClientIDs to map configurable inputs to uTLS fingerprints We use a non-zero index to map to each ClientID
Functions ¶
func NewDialerTTLWrapper ¶
Types ¶
type CompleteTrace ¶
type CompleteTrace struct { Address string `json:"address"` ControlTrace *IterativeTrace `json:"control_trace"` TargetTrace *IterativeTrace `json:"target_trace"` }
CompleteTrace records the result of the network trace using a control SNI and a target SNI
type Config ¶
type Config struct { // ResolverURL is the default DoH resolver ResolverURL string `ooni:"URL for DoH resolver"` // SNIPass is the SNI value we don't expect to be blocked SNIControl string `ooni:"control SNI value for testhelper"` // Delay is the delay between each iteration (in milliseconds). Delay int64 `ooni:"delay between consecutive iterations"` // MaxTTL is the default number of interations we trace MaxTTL int64 `ooni:"maximum TTL value to iterate upto"` // TestHelper is the testhelper host for iterative tracing TestHelper string `ooni:"testhelper URL to use for tracing"` // ClientId is the client fingerprint to use ClientId int `ooni:"ClientHello fingerprint to use"` }
Config contains the experiment configuration.
type Iteration ¶
type Iteration struct { TTL int `json:"ttl"` Handshake *model.ArchivalTLSOrQUICHandshakeResult `json:"handshake"` }
Iteration is a single network iteration with variable TTL
type IterativeTrace ¶
type IterativeTrace struct { SNI string `json:"server_name"` Iterations []*Iteration `json:"iterations"` // contains filtered or unexported fields }
Trace is an iterative trace for the corresponding servername and address
type Measurer ¶
type Measurer struct {
// contains filtered or unexported fields
}
Measurer performs the measurement.
func NewExperimentMeasurer ¶
NewExperimentMeasurer creates a new ExperimentMeasurer.
func (*Measurer) DNSLookup ¶
func (m *Measurer) DNSLookup(ctx context.Context, index int64, zeroTime time.Time, logger model.Logger, domain string, tk *TestKeys) ([]string, error)
DNSLookup performs a DNS Lookup for the passed domain
func (*Measurer) ExperimentName ¶
ExperimentName implements ExperimentMeasurer.ExperimentName.
func (*Measurer) ExperimentVersion ¶
ExperimentVersion implements ExperimentMeasurer.ExperimentVersion.
func (Measurer) GetSummaryKeys ¶
func (m Measurer) GetSummaryKeys(measurement *model.Measurement) (interface{}, error)
GetSummaryKeys implements model.ExperimentMeasurer.GetSummaryKeys.
func (*Measurer) TCPConnect ¶
func (m *Measurer) TCPConnect(ctx context.Context, index int64, zeroTime time.Time, logger model.Logger, address string, tk *TestKeys) error
TCPConnect performs a TCP connect to filter working addresses
type SummaryKeys ¶
type SummaryKeys struct {
IsAnomaly bool `json:"-"`
}
Summary contains the summary results
type TestKeys ¶
type TestKeys struct { Queries []*model.ArchivalDNSLookupResult `json:"queries"` TCPConnect []*model.ArchivalTCPConnectResult `json:"tcp_connect"` IterativeTrace []*CompleteTrace `json:"iterative_trace"` // contains filtered or unexported fields }
TestKeys contains the experiment results