engine

package module
v0.22.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: BSD-3-Clause Imports: 54 Imported by: 0

README

OONI probe measurement engine

GoDoc Short Tests Status All Tests Status Coverage Status Go Report Card

This repository contains OONI probe's measurement engine. That is, the piece of software that implements OONI nettests as well as all the required functionality to run such nettests.

We expect you to use the Go version indicated in go.mod.

Integrating ooni/probe-engine

We recommend pinning to a specific version of probe-engine:

go get -v github.com/ooni/probe-engine@VERSION

See also the workflows/using.yml test where we check that the latest commit can be imported by a third party.

We do not provide any API stability guarantee.

Building miniooni

miniooni is a small command line client used for research and quality assurance testing. Build using:

go build -v ./cmd/miniooni/

See also ./build-cli.bash for more advanced builds (e.g. to create statically linked and/or stripped binaries).

We don't provide any miniooni command line flags stability guarantee.

See

./miniooni --help

for more help.

Building Android bindings

./build-android.bash

We automatically build Android bindings whenever commits are pushed to the mobile-staging branch. Such builds could be integrated by using:

implementation "org.ooni:oonimkall:VERSION"

Where VERSION is like 2020.03.30-231914 corresponding to the time when the build occurred.

Building iOS bindings

./build-ios.bash

We automatically build iOS bindings whenever commits are pushed to the mobile-staging branch. Such builds could be integrated by using:

pod 'oonimkall', :podspec => 'https://dl.bintray.com/ooni/ios/oonimkall-VERSION.podspec'

Where VERSION is like 2020.03.30-231914 corresponding to the time when the build occurred.

Updating dependencies

go get -u -v ./... && go mod tidy

Documentation

Overview

Package engine contains the engine API

Index

Constants

View Source
const (
	// InputOrQueryTestLists indicates that the experiment requires
	// external input to run and that this kind of input is URLs
	// from the citizenlab/test-lists repository. If this input
	// not provided to the experiment, then the code that runs the
	// experiment is supposed to fetch from URLs from OONI's backends.
	InputOrQueryTestLists = InputPolicy("or_query_test_lists")

	// InputStrictlyRequired indicates that the experiment
	// requires input and we currently don't have an API for
	// fetching such input. Therefore, either the user specifies
	// input or the experiment will fail for the lack of input.
	InputStrictlyRequired = InputPolicy("strictly_required")

	// InputOptional indicates that the experiment handles input,
	// if any; otherwise it fetchs input/uses a default.
	InputOptional = InputPolicy("optional")

	// InputNone indicates that the experiment does not want any
	// input and ignores the input if provided with it.
	InputNone = InputPolicy("none")
)

Variables

View Source
var (
	ErrNoInputExpected   = errors.New("we did not expect any input")
	ErrInputRequired     = errors.New("no input provided")
	ErrDetectedEmptyFile = errors.New("file did not contain any input")
)

The following errors are returned by the InputLoader.

View Source
var ErrAllProbeServicesFailed = errors.New("all available probe services failed")

ErrAllProbeServicesFailed indicates all probe services failed.

View Source
var ErrAlreadyUsingProxy = errors.New(
	"session: cannot create a new tunnel of this kind: we are already using a proxy",
)

ErrAlreadyUsingProxy indicates that we cannot create a tunnel with a specific name because we already configured a proxy.

Functions

func AllExperiments

func AllExperiments() []string

AllExperiments returns the name of all experiments

Types

type Experiment

type Experiment struct {
	// contains filtered or unexported fields
}

Experiment is an experiment instance.

func NewExperiment added in v0.8.0

func NewExperiment(sess *Session, measurer model.ExperimentMeasurer) *Experiment

NewExperiment creates a new experiment given a measurer. The preferred way to create an experiment is the ExperimentBuilder. Though this function allows the programmer to create a custom, external experiment.

func (*Experiment) GetSummaryKeys added in v0.21.0

func (e *Experiment) GetSummaryKeys(m *model.Measurement) (interface{}, error)

GetSummaryKeys returns a data structure containing a summary of the test keys for probe-cli.

func (*Experiment) KibiBytesReceived added in v0.9.0

func (e *Experiment) KibiBytesReceived() float64

KibiBytesReceived accounts for the KibiBytes received by the HTTP clients managed by this session so far, including experiments.

func (*Experiment) KibiBytesSent added in v0.9.0

func (e *Experiment) KibiBytesSent() float64

KibiBytesSent is like KibiBytesReceived but for the bytes sent.

func (*Experiment) Measure

func (e *Experiment) Measure(input string) (*model.Measurement, error)

Measure performs a measurement with input. We assume that you have configured the available test helpers, either manually or by calling the session's MaybeLookupBackends() method.

func (*Experiment) MeasureWithContext added in v0.9.0

func (e *Experiment) MeasureWithContext(
	ctx context.Context, input string,
) (measurement *model.Measurement, err error)

MeasureWithContext is like Measure but with context.

func (*Experiment) Name

func (e *Experiment) Name() string

Name returns the experiment name.

func (*Experiment) OpenReport

func (e *Experiment) OpenReport() (err error)

OpenReport is an idempotent method to open a report. We assume that you have configured the available probe services, either manually or through using the session's MaybeLookupBackends method.

func (*Experiment) OpenReportContext added in v0.21.0

func (e *Experiment) OpenReportContext(ctx context.Context) error

OpenReportContext will open a report using the given context to possibly limit the lifetime of this operation.

func (*Experiment) ReportID

func (e *Experiment) ReportID() string

ReportID returns the open reportID, if we have opened a report successfully before, or an empty string, otherwise.

func (*Experiment) SaveMeasurement

func (e *Experiment) SaveMeasurement(measurement *model.Measurement, filePath string) error

SaveMeasurement saves a measurement on the specified file path.

func (*Experiment) SubmitAndUpdateMeasurement

func (e *Experiment) SubmitAndUpdateMeasurement(measurement *model.Measurement) error

SubmitAndUpdateMeasurement submits a measurement and updates the fields whose value has changed as part of the submission.

func (*Experiment) SubmitAndUpdateMeasurementContext added in v0.21.0

func (e *Experiment) SubmitAndUpdateMeasurementContext(
	ctx context.Context, measurement *model.Measurement) error

SubmitAndUpdateMeasurementContext submits a measurement and updates the fields whose value has changed as part of the submission.

type ExperimentBuilder

type ExperimentBuilder struct {
	// contains filtered or unexported fields
}

ExperimentBuilder is an experiment builder.

func (*ExperimentBuilder) InputPolicy added in v0.11.0

func (b *ExperimentBuilder) InputPolicy() InputPolicy

InputPolicy returns the experiment input policy

func (*ExperimentBuilder) Interruptible added in v0.9.0

func (b *ExperimentBuilder) Interruptible() bool

Interruptible tells you whether this is an interruptible experiment. This kind of experiments (e.g. ndt7) may be interrupted mid way.

func (*ExperimentBuilder) NewExperiment added in v0.8.0

func (b *ExperimentBuilder) NewExperiment() *Experiment

NewExperiment creates the experiment

func (*ExperimentBuilder) Options

func (b *ExperimentBuilder) Options() (map[string]OptionInfo, error)

Options returns info about all options

func (*ExperimentBuilder) SetCallbacks

func (b *ExperimentBuilder) SetCallbacks(callbacks model.ExperimentCallbacks)

SetCallbacks sets the interactive callbacks

func (*ExperimentBuilder) SetOptionBool

func (b *ExperimentBuilder) SetOptionBool(key string, value bool) error

SetOptionBool sets a bool option

func (*ExperimentBuilder) SetOptionGuessType added in v0.21.0

func (b *ExperimentBuilder) SetOptionGuessType(key, value string) error

SetOptionGuessType sets an option whose type depends on the option value. If the value is `"true"` or `"false"` we assume the option is boolean. If the value is numeric, then we set an integer option. Otherwise we set a string option.

func (*ExperimentBuilder) SetOptionInt

func (b *ExperimentBuilder) SetOptionInt(key string, value int64) error

SetOptionInt sets an int option

func (*ExperimentBuilder) SetOptionString

func (b *ExperimentBuilder) SetOptionString(key, value string) error

SetOptionString sets a string option

func (*ExperimentBuilder) SetOptionsGuessType added in v0.21.0

func (b *ExperimentBuilder) SetOptionsGuessType(opts map[string]string) error

SetOptionsGuessType calls the SetOptionGuessType method for every key, value pair contained by the opts input map.

type FileSystemKVStore added in v0.4.0

type FileSystemKVStore struct {
	// contains filtered or unexported fields
}

FileSystemKVStore is a directory based KVStore

func NewFileSystemKVStore added in v0.4.0

func NewFileSystemKVStore(basedir string) (kvs *FileSystemKVStore, err error)

NewFileSystemKVStore creates a new FileSystemKVStore.

func (*FileSystemKVStore) Get added in v0.4.0

func (kvs *FileSystemKVStore) Get(key string) ([]byte, error)

Get returns the specified key's value

func (*FileSystemKVStore) Set added in v0.4.0

func (kvs *FileSystemKVStore) Set(key string, value []byte) error

Set sets the value of a specific key

type InputLoader added in v0.21.0

type InputLoader interface {
	// Load attempts to load input using the specified input loader. We will
	// return a list of URLs because this is the only input we support.
	Load(ctx context.Context) ([]model.URLInfo, error)
}

InputLoader loads input according to the specified policy from the specified sources and OONI services. The behaviour depends on the input policy as described below.

InputNone

We fail if there is any StaticInput or any SourceFiles. If there's no input, we return a single, empty entry that causes experiments that don't require input to run once.

InputOptional

We gather input from StaticInput and SourceFiles. If there is input, we return it. Otherwise we return a single, empty entry that causes experiments that don't require input to run once.

InputOrQueryTestLists

We gather input from StaticInput and SourceFiles. If there is input, we return it. Otherwise, we use OONI's probe services to gather input using the test lists API.

InputStrictlyRequired

Like InputOrQueryTestLists but, if there is no input, it's an user error and we just abort running the experiment.

func NewInputLoader added in v0.21.0

func NewInputLoader(config InputLoaderConfig) InputLoader

NewInputLoader creates a new InputLoader.

type InputLoaderConfig added in v0.21.0

type InputLoaderConfig struct {
	// StaticInputs contains optional input to be added
	// to the resulting input list if possible.
	StaticInputs []string

	// SourceFiles contains optional files to read input
	// from. Each file should contain a single input string
	// per line. We will fail if any file is unreadable.
	SourceFiles []string

	// InputPolicy specifies the input policy for the
	// current experiment. We will not load any input if
	// the policy says we should not.
	InputPolicy InputPolicy

	// Session is the current measurement session.
	Session InputLoaderSession

	// URLLimit is the optional limit on the number of URLs
	// that probe services should return to us.
	URLLimit int64

	// URLCategories limits the categories of URLs that
	// probe services should return to us.
	URLCategories []string
}

InputLoaderConfig contains config for InputLoader.

type InputLoaderSession added in v0.21.0

type InputLoaderSession interface {
	MaybeLookupLocationContext(ctx context.Context) error
	NewOrchestraClient(ctx context.Context) (model.ExperimentOrchestraClient, error)
	ProbeCC() string
}

InputLoaderSession is the session according to an InputLoader.

type InputPolicy added in v0.11.0

type InputPolicy string

InputPolicy describes the experiment policy with respect to input. That is whether it requires input, optionally accepts input, does not want input.

type InputProcessor added in v0.21.0

type InputProcessor struct {
	// Annotations contains the measurement annotations
	Annotations map[string]string

	// Experiment is the code that will run the experiment.
	Experiment InputProcessorExperimentWrapper

	// Inputs is the list of inputs to measure.
	Inputs []model.URLInfo

	// Options contains command line options for this experiment.
	Options []string

	// Saver is the code that will save measurement results
	// on persistent storage (e.g. the file system).
	Saver InputProcessorSaverWrapper

	// Submitter is the code that will submit measurements
	// to the OONI collector.
	Submitter InputProcessorSubmitterWrapper
}

InputProcessor processes inputs. We perform a Measurement for each input using the given Experiment.

func (InputProcessor) Run added in v0.21.0

func (ip InputProcessor) Run(ctx context.Context) error

Run processes all the input subject to the duration of the context. The code will perform measurements using the given experiment; submit measurements using the given submitter; save measurements using the given saver.

Annotations and Options will be saved in the measurement.

The default behaviour of this code is that an error while measuring, while submitting, or while saving a measurement is always causing us to break out of the loop. The user though is free to choose different policies by configuring the Experiment, Submitter, and Saver fields properly.

type InputProcessorExperiment added in v0.21.0

type InputProcessorExperiment interface {
	MeasureWithContext(
		ctx context.Context, input string) (*model.Measurement, error)
}

InputProcessorExperiment is the Experiment according to InputProcessor.

type InputProcessorExperimentWrapper added in v0.21.0

type InputProcessorExperimentWrapper interface {
	MeasureWithContext(
		ctx context.Context, idx int, input string) (*model.Measurement, error)
}

InputProcessorExperimentWrapper is a wrapper for an Experiment that also allow to pass around the input index.

func NewInputProcessorExperimentWrapper added in v0.21.0

func NewInputProcessorExperimentWrapper(
	exp InputProcessorExperiment) InputProcessorExperimentWrapper

NewInputProcessorExperimentWrapper creates a new instance of InputProcessorExperimentWrapper.

type InputProcessorSaverWrapper added in v0.21.0

type InputProcessorSaverWrapper interface {
	SaveMeasurement(idx int, m *model.Measurement) error
}

InputProcessorSaverWrapper is InputProcessor's wrapper for a Saver implementation.

func NewInputProcessorSaverWrapper added in v0.21.0

func NewInputProcessorSaverWrapper(saver Saver) InputProcessorSaverWrapper

NewInputProcessorSaverWrapper wraps a Saver for InputProcessor.

type InputProcessorSubmitterWrapper added in v0.21.0

type InputProcessorSubmitterWrapper interface {
	SubmitAndUpdateMeasurementContext(
		ctx context.Context, idx int, m *model.Measurement) error
}

InputProcessorSubmitterWrapper is InputProcessor's wrapper for a Submitter implementation.

func NewInputProcessorSubmitterWrapper added in v0.21.0

func NewInputProcessorSubmitterWrapper(submitter Submitter) InputProcessorSubmitterWrapper

NewInputProcessorSubmitterWrapper wraps a Submitter for the InputProcessor.

type KVStore added in v0.4.0

type KVStore interface {
	Get(key string) (value []byte, err error)
	Set(key string, value []byte) (err error)
}

KVStore is a simple, atomic key-value store. The user of probe-engine should supply an implementation of this interface, which will be used by probe-engine to store specific data.

type OptionInfo

type OptionInfo struct {
	Doc  string
	Type string
}

OptionInfo contains info about an option

type Saver added in v0.21.0

type Saver interface {
	SaveMeasurement(m *model.Measurement) error
}

Saver saves a measurement on some persistent storage.

func NewSaver added in v0.21.0

func NewSaver(config SaverConfig) (Saver, error)

NewSaver creates a new instance of Saver.

type SaverConfig added in v0.21.0

type SaverConfig struct {
	// Enabled is true if saving is enabled.
	Enabled bool

	// Experiment is the experiment we're currently running.
	Experiment SaverExperiment

	// FilePath is the filepath where to append the measurement as a
	// serialized JSON followed by a newline character.
	FilePath string

	// Logger is the logger used by the saver.
	Logger model.Logger
}

SaverConfig is the configuration for creating a new Saver.

type SaverExperiment added in v0.21.0

type SaverExperiment interface {
	SaveMeasurement(m *model.Measurement, filepath string) error
}

SaverExperiment is an experiment according to the Saver.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session is a measurement session

func NewSession

func NewSession(config SessionConfig) (*Session, error)

NewSession creates a new session or returns an error

func (*Session) ASNDatabasePath added in v0.8.0

func (s *Session) ASNDatabasePath() string

ASNDatabasePath returns the path where the ASN database path should be if you have called s.FetchResourcesIdempotent.

func (*Session) Close added in v0.8.0

func (s *Session) Close() error

Close ensures that we close all the idle connections that the HTTP clients we are currently using may have created. It will also remove the temp dir that contains data from this session. Not calling this function may likely cause memory leaks in your application because of open idle connections, as well as excessive usage of disk space.

func (*Session) CountryDatabasePath added in v0.8.0

func (s *Session) CountryDatabasePath() string

CountryDatabasePath is like ASNDatabasePath but for the country DB path.

func (*Session) DefaultHTTPClient added in v0.8.0

func (s *Session) DefaultHTTPClient() *http.Client

DefaultHTTPClient returns the session's default HTTP client.

func (*Session) GetTestHelpersByName added in v0.8.0

func (s *Session) GetTestHelpersByName(name string) ([]model.Service, bool)

GetTestHelpersByName returns the available test helpers that use the specified name, or false if there's none.

func (*Session) KeyValueStore added in v0.14.0

func (s *Session) KeyValueStore() model.KeyValueStore

KeyValueStore returns the configured key-value store.

func (*Session) KibiBytesReceived added in v0.9.0

func (s *Session) KibiBytesReceived() float64

KibiBytesReceived accounts for the KibiBytes received by the HTTP clients managed by this session so far, including experiments.

func (*Session) KibiBytesSent added in v0.9.0

func (s *Session) KibiBytesSent() float64

KibiBytesSent is like KibiBytesReceived but for the bytes sent.

func (*Session) Logger added in v0.8.0

func (s *Session) Logger() model.Logger

Logger returns the logger used by the session.

func (*Session) LookupLocationContext added in v0.20.0

func (s *Session) LookupLocationContext(ctx context.Context) (out *model.LocationInfo, err error)

LookupLocationContext performs a location lookup. If you want memoisation of the results, you should use MaybeLookupLocationContext.

func (*Session) MaybeLookupBackends

func (s *Session) MaybeLookupBackends() error

MaybeLookupBackends is a caching OONI backends lookup call.

func (*Session) MaybeLookupBackendsContext added in v0.21.0

func (s *Session) MaybeLookupBackendsContext(ctx context.Context) (err error)

MaybeLookupBackendsContext is like MaybeLookupBackends but with context.

func (*Session) MaybeLookupLocation

func (s *Session) MaybeLookupLocation() error

MaybeLookupLocation is a caching location lookup call.

func (*Session) MaybeLookupLocationContext added in v0.20.0

func (s *Session) MaybeLookupLocationContext(ctx context.Context) error

MaybeLookupLocationContext is like MaybeLookupLocation but with a context that can be used to interrupt this long running operation.

func (*Session) MaybeStartTunnel added in v0.10.0

func (s *Session) MaybeStartTunnel(ctx context.Context, name string) error

MaybeStartTunnel starts the requested tunnel.

This function silently succeeds if we're already using a tunnel with the same name or if the requested tunnel name is the empty string. This function fails, tho, when we already have a proxy or a tunnel with another name and we try to open a tunnel. This function of course also fails if we cannot start the requested tunnel. All in all, if you request for a tunnel name that is not the empty string and you get a nil error, you can be confident that session.ProxyURL() gives you the tunnel URL.

The tunnel will be closed by session.Close().

func (*Session) MaybeUpdateResources added in v0.20.0

func (s *Session) MaybeUpdateResources(ctx context.Context) error

MaybeUpdateResources updates the resources if needed.

func (*Session) NewExperimentBuilder

func (s *Session) NewExperimentBuilder(name string) (*ExperimentBuilder, error)

NewExperimentBuilder returns a new experiment builder for the experiment with the given name, or an error if there's no such experiment with the given name

func (*Session) NewOrchestraClient added in v0.8.0

func (s *Session) NewOrchestraClient(ctx context.Context) (model.ExperimentOrchestraClient, error)

NewOrchestraClient creates a new orchestra client. This client is registered and logged in with the OONI orchestra. An error is returned on failure.

func (*Session) NewProbeServicesClient added in v0.20.0

func (s *Session) NewProbeServicesClient(ctx context.Context) (*probeservices.Client, error)

NewProbeServicesClient creates a new client for talking with the OONI probe services. This function will benchmark the available probe services, and select the fastest. In case all probe services seem to be down, we try again applying circumvention tactics.

func (*Session) Platform added in v0.3.0

func (s *Session) Platform() string

Platform returns the current platform. The platform is one of:

- android - ios - linux - macos - windows - unknown

When running on the iOS simulator, the returned platform is macos rather than ios if CGO is disabled. This is a known issue, that however should have a very limited impact.

func (*Session) ProbeASN

func (s *Session) ProbeASN() uint

ProbeASN returns the probe ASN as an integer.

func (*Session) ProbeASNString

func (s *Session) ProbeASNString() string

ProbeASNString returns the probe ASN as a string.

func (*Session) ProbeCC

func (s *Session) ProbeCC() string

ProbeCC returns the probe CC.

func (*Session) ProbeIP

func (s *Session) ProbeIP() string

ProbeIP returns the probe IP.

func (*Session) ProbeNetworkName

func (s *Session) ProbeNetworkName() string

ProbeNetworkName returns the probe network name.

func (*Session) ProxyURL added in v0.10.0

func (s *Session) ProxyURL() *url.URL

ProxyURL returns the Proxy URL, or nil if not set

func (*Session) ResolverASN added in v0.5.0

func (s *Session) ResolverASN() uint

ResolverASN returns the resolver ASN

func (*Session) ResolverASNString added in v0.5.0

func (s *Session) ResolverASNString() string

ResolverASNString returns the resolver ASN as a string

func (*Session) ResolverIP

func (s *Session) ResolverIP() string

ResolverIP returns the resolver IP

func (*Session) ResolverNetworkName added in v0.5.0

func (s *Session) ResolverNetworkName() string

ResolverNetworkName returns the resolver network name.

func (*Session) SoftwareName added in v0.8.0

func (s *Session) SoftwareName() string

SoftwareName returns the application name.

func (*Session) SoftwareVersion added in v0.8.0

func (s *Session) SoftwareVersion() string

SoftwareVersion returns the application version.

func (*Session) TempDir added in v0.8.0

func (s *Session) TempDir() string

TempDir returns the temporary directory.

func (*Session) TorArgs added in v0.11.0

func (s *Session) TorArgs() []string

TorArgs returns the configured extra args for the tor binary. If not set we will not pass in any extra arg. Applies to `-OTunnel=tor` mainly.

func (*Session) TorBinary added in v0.11.0

func (s *Session) TorBinary() string

TorBinary returns the configured path to the tor binary. If not set we will attempt to use "tor". Applies to `-OTunnel=tor` mainly.

func (*Session) UserAgent added in v0.8.0

func (s *Session) UserAgent() (useragent string)

UserAgent constructs the user agent to be used in this session.

type SessionConfig

type SessionConfig struct {
	AssetsDir              string
	AvailableProbeServices []model.Service
	KVStore                KVStore
	Logger                 model.Logger
	ProxyURL               *url.URL
	SoftwareName           string
	SoftwareVersion        string
	TempDir                string
	TorArgs                []string
	TorBinary              string
}

SessionConfig contains the Session config

type Submitter added in v0.21.0

type Submitter interface {
	// SubmitAndUpdateMeasurementContext submits the measurement
	// and updates its report ID field in case of success.
	SubmitAndUpdateMeasurementContext(
		ctx context.Context, m *model.Measurement) error
}

Submitter submits a measurement to the OONI collector.

func NewSubmitter added in v0.21.0

func NewSubmitter(ctx context.Context, config SubmitterConfig) (Submitter, error)

NewSubmitter creates a new submitter instance. Depending on whether submission is enabled or not, the returned submitter instance migh just be a stub implementation.

type SubmitterConfig added in v0.21.0

type SubmitterConfig struct {
	// Enabled is true if measurement submission is enabled.
	Enabled bool

	// Experiment is the current experiment.
	Experiment SubmitterExperiment

	// Logger is the logger to be used.
	Logger model.Logger
}

SubmitterConfig contains settings for NewSubmitter.

type SubmitterExperiment added in v0.21.0

type SubmitterExperiment interface {
	// ReportID returns the ID of the currently opened report.
	ReportID() string

	// OpenReportContext opens a report for this experiment using the
	// given context to possibly limit the operation duration.
	OpenReportContext(ctx context.Context) error

	// SubmitAndUpdateMeasurementContext submits the measurement
	// and updates its report ID field in case of sucess.
	SubmitAndUpdateMeasurementContext(
		ctx context.Context, m *model.Measurement) error
}

SubmitterExperiment is the Submitter's view of the Experiment.

Directories

Path Synopsis
Package atomicx contains atomic int64/float64 that work also on 32 bit platforms.
Package atomicx contains atomic int64/float64 that work also on 32 bit platforms.
cmd
apitool command
Command apitool is a simple tool to fetch individual OONI measurements.
Command apitool is a simple tool to fetch individual OONI measurements.
jafar command
Jafar is a censorship simulation tool used for testing OONI.
Jafar is a censorship simulation tool used for testing OONI.
jafar/badproxy
Package badproxy implements misbehaving proxies.
Package badproxy implements misbehaving proxies.
jafar/flagx
Package flagx contains extensions for the standard library flag package.
Package flagx contains extensions for the standard library flag package.
jafar/httpproxy
Package httpproxy contains a censoring HTTP proxy.
Package httpproxy contains a censoring HTTP proxy.
jafar/iptables
Package iptables contains code for managing firewall rules.
Package iptables contains code for managing firewall rules.
jafar/resolver
Package resolver contains a censoring DNS resolver.
Package resolver contains a censoring DNS resolver.
jafar/shellx
Package shellx contains utilities to run external commands.
Package shellx contains utilities to run external commands.
jafar/tlsproxy
Package tlsproxy contains a censoring TLS proxy.
Package tlsproxy contains a censoring TLS proxy.
jafar/uncensored
Package uncensored contains code used by Jafar to evade its own censorship efforts by taking alternate routes.
Package uncensored contains code used by Jafar to evade its own censorship efforts by taking alternate routes.
miniooni command
Command miniooni is a simple binary for research and QA purposes with a CLI interface similar to MK and OONI Probe v2.x.
Command miniooni is a simple binary for research and QA purposes with a CLI interface similar to MK and OONI Probe v2.x.
oohelper command
Command oohelper contains a simple command line client for the Web Connectivity test helper.
Command oohelper contains a simple command line client for the Web Connectivity test helper.
oohelperd command
Command oohelperd contains the Web Connectivity test helper.
Command oohelperd contains the Web Connectivity test helper.
experiment
dash
Package dash implements the DASH network experiment.
Package dash implements the DASH network experiment.
dnscheck
Package dnscheck contains the DNS check experiment.
Package dnscheck contains the DNS check experiment.
example
Package example contains a simple example experiment.
Package example contains a simple example experiment.
fbmessenger
Package fbmessenger contains the Facebook Messenger network experiment.
Package fbmessenger contains the Facebook Messenger network experiment.
hhfm
Package hhfm contains the HTTP Header Field Manipulation network experiment.
Package hhfm contains the HTTP Header Field Manipulation network experiment.
hirl
Package hirl contains the HTTP Invalid Request Line network experiment.
Package hirl contains the HTTP Invalid Request Line network experiment.
httphostheader
Package httphostheader contains the HTTP host header network experiment.
Package httphostheader contains the HTTP host header network experiment.
ndt7
Package ndt7 contains the ndt7 network experiment.
Package ndt7 contains the ndt7 network experiment.
psiphon
Package psiphon implements the psiphon network experiment.
Package psiphon implements the psiphon network experiment.
riseupvpn
Package riseupvpn contains the RiseupVPN network experiment.
Package riseupvpn contains the RiseupVPN network experiment.
run
Package run contains code to run other experiments.
Package run contains code to run other experiments.
sniblocking
Package sniblocking contains the SNI blocking network experiment.
Package sniblocking contains the SNI blocking network experiment.
stunreachability
Package stunreachability contains the STUN reachability experiment.
Package stunreachability contains the STUN reachability experiment.
telegram
Package telegram contains the Telegram network experiment.
Package telegram contains the Telegram network experiment.
tlstool
Package tlstool contains a TLS tool that we are currently using for running quick and dirty experiments.
Package tlstool contains a TLS tool that we are currently using for running quick and dirty experiments.
tlstool/internal
Package internal contains the implementation of tlstool.
Package internal contains the implementation of tlstool.
tor
Package tor contains the tor experiment.
Package tor contains the tor experiment.
urlgetter
Package urlgetter implements a nettest that fetches a URL.
Package urlgetter implements a nettest that fetches a URL.
webconnectivity
Package webconnectivity implements OONI's Web Connectivity experiment.
Package webconnectivity implements OONI's Web Connectivity experiment.
webconnectivity/internal
Package internal contains internal code.
Package internal contains internal code.
whatsapp
Package whatsapp contains the WhatsApp network experiment.
Package whatsapp contains the WhatsApp network experiment.
Package geolocate implements IP lookup, resolver lookup, and GeoIP location an OONI Probe instance.
Package geolocate implements IP lookup, resolver lookup, and GeoIP location an OONI Probe instance.
internal
fsx
Package fsx contains file system extension
Package fsx contains file system extension
httpfailure
Package httpfailure groups a bunch of extra HTTP failures.
Package httpfailure groups a bunch of extra HTTP failures.
httpheader
Package httpheader contains code to set common HTTP headers.
Package httpheader contains code to set common HTTP headers.
httpx
Package httpx contains http extensions.
Package httpx contains http extensions.
humanizex
Package humanizex is like dustin/go-humanize
Package humanizex is like dustin/go-humanize
kvstore
Package kvstore contains key-value stores
Package kvstore contains key-value stores
mlablocate
Package mlablocate contains a locate.measurementlab.net client.
Package mlablocate contains a locate.measurementlab.net client.
mlablocatev2
Package mlablocatev2 use m-lab locate services API v2.
Package mlablocatev2 use m-lab locate services API v2.
mockable
Package mockable contains mockable objects
Package mockable contains mockable objects
multierror
Package multierror contains code to manage multiple errors.
Package multierror contains code to manage multiple errors.
platform
Package platform returns the platform name.
Package platform returns the platform name.
psiphonx
Package psiphonx is a wrapper around the psiphon-tunnel-core.
Package psiphonx is a wrapper around the psiphon-tunnel-core.
randx
Package randx contains math/rand extensions
Package randx contains math/rand extensions
runtimex
Package runtimex contains runtime extensions.
Package runtimex contains runtime extensions.
sessionresolver
Package sessionresolver contains the resolver used by the session.
Package sessionresolver contains the resolver used by the session.
tlsx
Package tlsx contains TLS extensions
Package tlsx contains TLS extensions
torx
Package torx contains code to control tor.
Package torx contains code to control tor.
tunnel
Package tunnel contains code to create a psiphon or tor tunnel.
Package tunnel contains code to create a psiphon or tor tunnel.
legacy
netx
Package netx contains OONI's net extensions.
Package netx contains OONI's net extensions.
netx/connid
Package connid contains code to generate the connectionID
Package connid contains code to generate the connectionID
netx/handlers
Package handlers contains default modelx.Handler handlers.
Package handlers contains default modelx.Handler handlers.
netx/modelx
Package modelx contains the data modelx.
Package modelx contains the data modelx.
netx/oldhttptransport
Package oldhttptransport contains HTTP transport extensions.
Package oldhttptransport contains HTTP transport extensions.
netx/transactionid
Package transactionid contains code to share the transactionID
Package transactionid contains code to share the transactionID
netxlogger
Package netxlogger is a logger for netx events.
Package netxlogger is a logger for netx events.
oonidatamodel
Package oonidatamodel contains the OONI data model.
Package oonidatamodel contains the OONI data model.
oonitemplates
Package oonitemplates contains templates for experiments.
Package oonitemplates contains templates for experiments.
Package libminiooni implements the cmd/miniooni CLI.
Package libminiooni implements the cmd/miniooni CLI.
Package model defines shared data structures and interfaces.
Package model defines shared data structures and interfaces.
Package netx contains code to perform network measurements.
Package netx contains code to perform network measurements.
archival
Package archival contains data formats used for archival.
Package archival contains data formats used for archival.
errorx
Package errorx contains error extensions
Package errorx contains error extensions
httptransport
Package httptransport contains HTTP transport extensions.
Package httptransport contains HTTP transport extensions.
selfcensor
Package selfcensor contains code that triggers censorship.
Package selfcensor contains code that triggers censorship.
Package oonimkall implements APIs used by OONI mobile apps.
Package oonimkall implements APIs used by OONI mobile apps.
tasks
Package tasks implements tasks run using the oonimkall API.
Package tasks implements tasks run using the oonimkall API.
Package probeservices contains code to contact OONI probe services.
Package probeservices contains code to contact OONI probe services.
testorchestra
Package testorchestra helps with testing the OONI orchestra API.
Package testorchestra helps with testing the OONI orchestra API.
Package resources contains code to download resources.
Package resources contains code to download resources.
Package version contains the probe-engine version.
Package version contains the probe-engine version.

Jump to

Keyboard shortcuts

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