psiphon

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package psiphon implements the psiphon network experiment. This implements, in particular, v0.2.0 of the spec.

See https://github.com/ooni/spec/blob/master/nettests/ts-015-psiphon.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 Config

type Config struct{}

Config contains the experiment's configuration.

type Measurer

type Measurer struct {
	BeforeGetHook func(g urlgetter.Getter)
	Config        Config
}

Measurer is the psiphon measurer.

func (*Measurer) ExperimentName

func (m *Measurer) ExperimentName() string

ExperimentName returns the experiment name

func (*Measurer) ExperimentVersion

func (m *Measurer) ExperimentVersion() string

ExperimentVersion returns the experiment version

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, args *model.ExperimentArgs) error

Run runs the measurement

type SummaryKeys

type SummaryKeys struct {
	BootstrapTime float64 `json:"bootstrap_time"`
	Failure       string  `json:"failure"`
	IsAnomaly     bool    `json:"-"`
}

SummaryKeys contains summary keys for this experiment.

Note that this structure is part of the ABI contract with ooniprobe therefore we should be careful when changing it.

type TestKeys

type TestKeys struct {
	urlgetter.TestKeys
	MaxRuntime float64 `json:"max_runtime"`
}

TestKeys contains the experiment's result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL