Documentation ¶
Overview ¶
Package tor contains the tor experiment.
Spec: https://github.com/ooni/spec/blob/master/nettests/ts-023-tor.md
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExperimentMeasurer ¶
func NewExperimentMeasurer(config Config) model.ExperimentMeasurer
NewExperimentMeasurer creates a new ExperimentMeasurer.
Types ¶
type Measurer ¶
type Measurer struct {
// contains filtered or unexported fields
}
Measurer performs the measurement.
func (*Measurer) ExperimentName ¶
ExperimentName implements ExperimentMeasurer.ExperiExperimentName.
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) Run ¶
func (m *Measurer) Run( ctx context.Context, sess model.ExperimentSession, measurement *model.Measurement, callbacks model.ExperimentCallbacks, ) error
Run implements ExperimentMeasurer.Run.
type Summary ¶
type Summary struct {
Failure *string `json:"failure"`
}
Summary contains a summary of what happened.
type SummaryKeys ¶
type SummaryKeys struct { DirPortTotal int64 `json:"dir_port_total"` DirPortAccessible int64 `json:"dir_port_accessible"` OBFS4Total int64 `json:"obfs4_total"` OBFS4Accessible int64 `json:"obfs4_accessible"` ORPortDirauthTotal int64 `json:"or_port_dirauth_total"` ORPortDirauthAccessible int64 `json:"or_port_dirauth_accessible"` ORPortTotal int64 `json:"or_port_total"` ORPortAccessible int64 `json:"or_port_accessible"` IsAnomaly bool `json:"-"` }
SummaryKeys contains summary keys for this experiment.
Note that this structure is part of the ABI contract with probe-cli therefore we should be careful when changing it.
type TargetResults ¶
type TargetResults struct { Agent string `json:"agent"` Failure *string `json:"failure"` NetworkEvents oonidatamodel.NetworkEventsList `json:"network_events"` Queries oonidatamodel.DNSQueriesList `json:"queries"` Requests oonidatamodel.RequestList `json:"requests"` Summary map[string]Summary `json:"summary"` TargetAddress string `json:"target_address"` TargetName string `json:"target_name,omitempty"` TargetProtocol string `json:"target_protocol"` TargetSource string `json:"target_source,omitempty"` TCPConnect oonidatamodel.TCPConnectList `json:"tcp_connect"` TLSHandshakes oonidatamodel.TLSHandshakesList `json:"tls_handshakes"` // Only for testing. We don't care about this field otherwise. We // cannot make this private because otherwise the IP address sanitizer // is going to panic over a private field. DirPortCount int `json:"-"` }
TargetResults contains the results of measuring a target.
type TestKeys ¶
type TestKeys struct { DirPortTotal int64 `json:"dir_port_total"` DirPortAccessible int64 `json:"dir_port_accessible"` OBFS4Total int64 `json:"obfs4_total"` OBFS4Accessible int64 `json:"obfs4_accessible"` ORPortDirauthTotal int64 `json:"or_port_dirauth_total"` ORPortDirauthAccessible int64 `json:"or_port_dirauth_accessible"` ORPortTotal int64 `json:"or_port_total"` ORPortAccessible int64 `json:"or_port_accessible"` Targets map[string]TargetResults `json:"targets"` }
TestKeys contains tor test keys.