Documentation
¶
Overview ¶
Package sniblocking contains the SNI blocking network experiment.
See https://github.com/ooni/spec/blob/master/nettests/ts-024-sni-blocking.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInputRequired indicates that no richer-input target was provided. ErrInputRequired = targetloading.ErrInputRequired // ErrInvalidInputType indicates that the richer-input target has the wrong type. ErrInvalidInputType = targetloading.ErrInvalidInputType )
Functions ¶
func NewExperimentMeasurer ¶
func NewExperimentMeasurer() model.ExperimentMeasurer
NewExperimentMeasurer creates a new ExperimentMeasurer.
func NewLoader ¶ added in v3.31.0
func NewLoader(loader *targetloading.Loader, gopts any) model.ExperimentTargetLoader
NewLoader constructs a new model.ExperimentTargetLoader instance.
This function PANICS if options is not an instance of *sniblocking.Config.
Types ¶
type Config ¶
type Config struct {
// ControlSNI is the SNI to be used for the control.
ControlSNI string `json:"control_sni,omitempty"`
// TestHelperAddress is the address of the test helper.
TestHelperAddress string `json:"test_helper_address,omitempty"`
}
Config contains the experiment config.
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.
type Subresult ¶
type Subresult struct {
urlgetter.TestKeys
Cached bool `json:"-"`
SNI string `json:"sni"`
THAddress string `json:"th_address"`
}
Subresult contains the keys of a single measurement that targets either the target or the control.
type Target ¶ added in v3.31.0
type Target struct {
// Config contains the configuration.
Config *Config
// URL is the input URL.
URL string
}
Target is a richer-input target that this experiment should measure.
func (*Target) Category ¶ added in v3.31.0
Category implements model.ExperimentTarget.
func (*Target) Country ¶ added in v3.31.0
Country implements model.ExperimentTarget.
func (*Target) Input ¶ added in v3.31.0
Input implements model.ExperimentTarget.
func (*Target) Options ¶ added in v3.31.0
Options implements model.ExperimentTarget.
func (*Target) String ¶ added in v3.31.0
String implements model.ExperimentTarget.