feat(torsf): experiment that bootstraps tor using snowflake (#387)

The current implementation assumes the user has already installed tor
on the current system. If tor is not present, the experiment fails.

This is meant to be the first version of this experiment.

We are going to add more functionality in subsequent revisions of
this experiment, once we've collected more feedback.

Reference issue: https://github.com/ooni/probe/issues/1565.

Here's the spec PR: https://github.com/ooni/spec/pull/218.

Here's the issue tracking future work: https://github.com/ooni/probe/issues/1686
This commit is contained in:
Simone Basso 2021-06-18 13:51:18 +02:00 committed by GitHub
commit a50efdbcf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 396 additions and 1 deletions

View file

@ -20,6 +20,7 @@ import (
"github.com/ooni/probe-cli/v3/internal/engine/experiment/telegram"
"github.com/ooni/probe-cli/v3/internal/engine/experiment/tlstool"
"github.com/ooni/probe-cli/v3/internal/engine/experiment/tor"
"github.com/ooni/probe-cli/v3/internal/engine/experiment/torsf"
"github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter"
"github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity"
"github.com/ooni/probe-cli/v3/internal/engine/experiment/whatsapp"
@ -289,6 +290,18 @@ var experimentsByName = map[string]func(*Session) *ExperimentBuilder{
}
},
"torsf": func(session *Session) *ExperimentBuilder {
return &ExperimentBuilder{
build: func(config interface{}) *Experiment {
return NewExperiment(session, torsf.NewExperimentMeasurer(
*config.(*torsf.Config),
))
},
config: &torsf.Config{},
inputPolicy: InputNone,
}
},
"urlgetter": func(session *Session) *ExperimentBuilder {
return &ExperimentBuilder{
build: func(config interface{}) *Experiment {