ooni-probe-cli/internal/model
Simone Basso 85664f1e31
feat(torsf): collect tor logs, select rendezvous method, count bytes (#683)
This diff contains significant improvements over the previous
implementation of the torsf experiment.

We add support for configuring different rendezvous methods after
the convo at https://github.com/ooni/probe/issues/2004. In doing
that, I've tried to use a terminology that is consistent with the
names being actually used by tor developers.

In terms of what to do next, this diff basically instruments
torsf to always rendezvous using domain fronting. Yet, it's also
possible to change the rendezvous method from the command line,
when using miniooni, which allows to experiment a bit more. In the
same vein, by default we use a persistent tor datadir, but it's
also possible to use a temporary datadir using the cmdline.

Here's how a generic invocation of `torsf` looks like:

```bash
./miniooni -O DisablePersistentDatadir=true \
           -O RendezvousMethod=amp \
           -O DisableProgress=true \
           torsf
```

(The default is `DisablePersistentDatadir=false` and
`RendezvousMethod=domain_fronting`.)

With this implementation, we can start measuring whether snowflake
and tor together can boostrap, which seems the most important thing
to focus on at the beginning. Understanding why the bootstrap most
often does not converge with a temporary datadir on Android devices
remains instead an open problem for now. (I'll also update the
relevant issues or create new issues after commit this.)

We also address some methodology improvements that were proposed
in https://github.com/ooni/probe/issues/1686. Namely:

1. we record the tor version;

2. we include the bootstrap percentage by reading the logs;

3. we set the anomaly key correctly;

4. we measure the bytes send and received (by `tor` not by `snowflake`, since
doing it for snowflake seems more complex at this stage).

What remains to be done is the possibility of including Snowflake
events into the measurement, which is not possible until the new
improvements at common/event in snowflake.git are included into a
tagged version of snowflake itself. (I'll make sure to mention
this aspect to @cohosh in https://github.com/ooni/probe/issues/2004.)
2022-02-07 17:05:36 +01:00
..
mocks feature: merge measurex and netx archival layer (1/N) (#663) 2022-01-14 12:13:10 +01:00
archival_test.go refactor: move i/netx/archival structs to i/model (#659) 2022-01-10 11:25:52 +01:00
archival.go refactor: move i/netx/archival structs to i/model (#659) 2022-01-10 11:25:52 +01:00
doc.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
experiment_test.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
experiment.go feat(torsf): collect tor logs, select rendezvous method, count bytes (#683) 2022-02-07 17:05:36 +01:00
keyvaluestore.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
logger_test.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
logger.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
measurement_test.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
measurement.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
netx.go feature: merge measurex and netx archival layer (1/N) (#663) 2022-01-14 12:13:10 +01:00
ooapi.go refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
README.md refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00

Package github.com/ooni/probe-engine/model

Shared data structures and interfaces. We include in this package the most fundamental types. Use go doc to get more thorough documentation about what is inside this package and when to put a type inside this package.