ooni-probe-cli/internal/engine/experiment
Simone Basso f4f3ed7c42
refactor(tracex): start applying recent code conventions (#773)
The code that is now into the tracex package was written a long
time ago, so let's start to make it more in line with the coding
style of packages that were written more recently.

I didn't apply all the changes I'd like to apply in a single diff
and for now I am committing just this diff.

Broadly, what we need to do is:

1. improve documentation

2. ~always use pointer receivers (object receives have the issue
that they are not mutable by accident meaning that you can mutate
them but their state do not change after the call returns, which
is potentially a source of bugs in case you later refactor to use
a pointer receiver, so always use pointer receivers)

3. ~always avoid embedding (let's say we want to avoid embedding
for types we define and it's instead fine to embed types that are
defined in the stdlib: if later we add a new method, we will not
see a broken build and we'll probably forget to add the new method
to all wrappers -- conversely, if we're wrapping rather than
embedding, we'll see a broken build and act accordingly)

4. prefer unit tests and group tests by type being tested rather
than using a flat structure for tests

There's a coverage slippage that I'll compensate in a follow-up diff where I'll focus on unit testing.

Reference issue: https://github.com/ooni/probe/issues/2121
2022-06-01 07:44:54 +02:00
..
dash refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
dnscheck refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
dnsping feat: add a simple dnsping experiment (#674) 2022-05-09 15:28:18 +02:00
example feat: introduce the tcpping experiment (#696) 2022-05-09 09:33:18 +02:00
fbmessenger refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
hhfm refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
hirl refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
httphostheader feat: introduce the tcpping experiment (#696) 2022-05-09 09:33:18 +02:00
ndt7 refactor(ndt7): use netxlite rather than netx (#768) 2022-05-30 23:14:07 +02:00
psiphon feat: introduce the tcpping experiment (#696) 2022-05-09 09:33:18 +02:00
quicping refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
riseupvpn refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
run fix: ensure experiments return nil when we want to submit (#654) 2022-01-07 13:17:20 +01:00
signal feat: introduce the tcpping experiment (#696) 2022-05-09 09:33:18 +02:00
simplequicping fix({simplequic,tls}ping): default SNI to URL's hostname (#753) 2022-05-24 16:29:13 +02:00
sniblocking netxlite: call getaddrinfo and handle platform-specific oddities (#764) 2022-05-28 15:10:30 +02:00
stunreachability refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
tcpping feat: introduce the tlsping experiment (#716) 2022-05-09 10:25:50 +02:00
telegram feat: introduce the tcpping experiment (#696) 2022-05-09 09:33:18 +02:00
tlsping fix({simplequic,tls}ping): default SNI to URL's hostname (#753) 2022-05-24 16:29:13 +02:00
tlstool refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
tor refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
torsf refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
urlgetter refactor(tracex): start applying recent code conventions (#773) 2022-06-01 07:44:54 +02:00
vanillator refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
webconnectivity refactor(netx): merge archival, trace, and the savers (#772) 2022-05-31 21:53:01 +02:00
whatsapp cleanup: merge httpheader and httpfailure into model (#758) 2022-05-25 09:54:50 +02:00
README.md chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00

Directory github.com/ooni/probe-engine/experiment

This directory contains the implementation of all the supported experiments, one for each directory. The OONI spec repository contains a description of all the specified experiments.

Note that in the OONI spec repository experiments are called nettests. Originally, they were also called nettests here but that created confusion with nettests in ooni/probe-cli. Therefore, we now use the term experiment to indicate the implementation and the term nettest to indicate the user facing view of such implementation.

Note that some experiments implemented here are not part of the OONI specification. For example, the urlgetter experiment is not in the OONI spec repository. The reason why this happens is that urlgetter is an experiment "library" that other experiments use to implement their functionality.

Likewise, the example experiment is a minimal experiment that does nothing and you could use to bootstrap the implementation of a new experiment. Of course, this experiment is not part of the OONI specification.