Commit Graph

1196 Commits

Author SHA1 Message Date
Simone Basso
800217d15b
chore: bump web_connectivity@v0.5 version to 0.5.5 (#945)
chore: web_connectivity v0.5.5

We're bumping the version number to reflect recent improvements in the
data format implemented in these pull requests:

- https://github.com/ooni/probe-cli/pull/942

- https://github.com/ooni/probe-cli/pull/943

- https://github.com/ooni/probe-cli/pull/944

Reference issue: https://github.com/ooni/probe/issues/2238
2022-09-08 11:22:42 +02:00
Simone Basso
8167de5805
fix(measurexlite): emit resolve_start and resolve_done (#944)
Part of https://github.com/ooni/probe/issues/2238
2022-09-08 11:05:38 +02:00
Simone Basso
5ade2d9568
fix(webconnectivity@v0.5): include http transaction start/done (#943)
Code based on urlgetter had this event and we would like to have this
event with step-by-step code as well.

Because there's no tracing for HTTP when using step-by-step, we will
need to include emitting these events inside the boilerplate.

By doing that, we emit events out of order, so make sure we sort
them by T, which is "the moment when the event was collected".

Part of https://github.com/ooni/probe/issues/2238
2022-09-08 10:37:08 +02:00
Simone Basso
596eab4a42
fix(QA): rundocker.sh => rundocker.bash
H/T @lorenzoPrimi
2022-09-08 10:09:30 +02:00
Simone Basso
39cb5959c9
fix(datafmt): sync measurexlite and v0.5 with previous code (#942)
* fix(model/archival.go): more optional keys

Basically, `t0` and `transaction_id` should be optional. Version 0.4.x
of web_connectivity should not include them, version 0.5.x should.

There is a technical reason why v0.4.x should not include them. The code
it is based on, tracex, does not record these two fields.

Whereas, v0.5.x, uses measurexlite, which records these two fields.

Part of https://github.com/ooni/probe/issues/2238

* fix(webconnectivity@v0.5): add more fields

This diff adds the following fields to webconnectivity@v0.5:

1. agent, always set to "redirect" (legacy field);

2. client_resolver, properly initialized w/ the resolver's IPv4 address;

3. retries, legacy field always set to null;

4. socksproxy, legacy field always set to null.

Part of https://github.com/ooni/probe/issues/2238

* fix(webconnectivity@v0.5): register extensions

The general idea behind this field is that we would be able
in the future to tweak the data model for some fields, by declaring
we're using a later version, so it seems useful to add it.

See https://github.com/ooni/probe/issues/2238

* fix(measurexlite): use tcp or quic for tls handshake network

This diff fixes a bug where measurexlite was using "tls" as the
protocol for the TLS handshake when using TCP.

While this choice _could_ make sense, the rest of the code we have
written so far uses "tcp" instead.

Using "tcp" makes more sense because it allows you to search for
the same endpoint across different events by checking for the same
network and for the same endpoint rather than special casing TLS
handshakes for using "tls" when the endpoint is "tcp".

See https://github.com/ooni/probe/issues/2238

* chore: run alltests.yml for "alltestsbuild" branches

Part of https://github.com/ooni/probe/issues/2238
2022-09-08 10:02:47 +02:00
Simone Basso
6ae5b5fce4
chore: more dependencies updates (#941)
Part of https://github.com/ooni/probe/issues/2130
2022-09-08 08:31:22 +02:00
Simone Basso
551e4a979c
chore: upgrade obfs4 to v0.0.14 (#940)
See https://github.com/ooni/probe/issues/2262
2022-09-07 21:33:59 +02:00
DecFox
59d8b6ecef
feat: add uTLS support in measurexlite (#918)
Closes https://github.com/ooni/probe/issues/2253 

Co-authored-by: decfox <decfox@github.com>
2022-09-07 15:19:53 +02:00
Simone Basso
9e8ad551aa
chore: set version to 3.17.0-alpha (#939)
I've just branched off the `release/3.16` branch since we're
really looking good for release modulo minor changes.

Hence, it's time to update `master`'s version.
2022-09-07 15:12:06 +02:00
Simone Basso
2389c7cab3
QA: refactor, cleanup, fix, and simplify (#938)
While working on https://github.com/ooni/probe/issues/2130, and specifically on the action item related to making sure all workflows are green, I was confronted with the complexity of the QA directory.

There's plenty of cleaning up and simplifying there. The original intent was to A/B test `miniooni` and `measurement_kit` to ensure they were behaving the same. We don't have this need anymore.

Rather, it seems the QA scripts have grown large and flaky, to the point that I am always tempted to ignore them. The underlying censorship engine, jafar, has also not been developed for quite some time.

So, the first step towards improve the QA infrastructure seems to be humble and acknowledge that we cannot realistically maintain these checks using jafar as a backend for so many experiments.

Let us focus on our most important experiment, Web Connectivity, and let us keep QA checks for it.

Additionally, let us simplify and cleanup QA as much as possible, though without introducing radical changes.

The end result is a QA for Web Connectivity that seems reasonable and runs in six minutes.
2022-09-07 14:55:36 +02:00
Simone Basso
1fc6babcc8
chore: use go1.18.6 (#937)
While there, also update to using go1.19.1 in the dedicated CI workflow.

Closes https://github.com/ooni/probe/issues/2256
2022-09-07 13:19:10 +02:00
Simone Basso
4247640a17
chore: update to ooni/go-libtor v1.1.6 (#936)
This is the last dependency we needed to update according to
the https://github.com/ooni/probe/issues/2130 checklist.
2022-09-05 21:52:46 +02:00
Simone Basso
71ce88d4af
chore: set version to 3.16.0-alpha.3 2022-09-05 13:35:41 +02:00
Simone Basso
3b24b1196d
fix(webconnectivity@v0.5): fetch HTTP only using system-resolver addrs (#935)
While there, change the emoji logger to emit whitespace on info logs. This makes warnings stand out even more.

Closes https://github.com/ooni/probe/issues/2258
2022-09-05 13:33:59 +02:00
Simone Basso
a72a9284f1
fix(measurexlite): expose TCP connect event (#934)
See https://github.com/ooni/probe/issues/2254
2022-09-05 12:21:16 +02:00
Simone Basso
3766ab2721
feat(webconnectivity@v0.5): use TLS info from TH (#933)
This diff modifies webconnectivity@v0.5 to take decisions regarding
TLS blocking by using the response from the TH rather than using
questionable heuristics based on inspecting the TLSHandshake list
alone. This change should improve correctness _when_ we're using
the improved TH, which is currently used for 50% of the probes.

See https://github.com/ooni/probe/issues/2257

While there, modify `control.go` to specify which control is being used.
2022-09-05 11:35:48 +02:00
Simone Basso
34dc029b33
feat(miniooni): optionally log using emojis (#932)
As silly as it seems, emojis help _a lot_ when eyeballing logs
to quickly identify unexpected lines.

I'm doing this work as part of https://github.com/ooni/probe/issues/2257
2022-09-05 10:06:44 +02:00
Simone Basso
4b13e4e78b
chore: upgrade user-agent used for measuring (#931)
Part of https://github.com/ooni/probe/issues/2130
2022-09-04 18:02:59 +02:00
Simone Basso
b669685aea
chore: upgrade to db-ip.com 2022-09 release (#930)
Part of https://github.com/ooni/probe/issues/2130
2022-09-04 17:45:31 +02:00
Simone Basso
6533d8a6c9
chore: run go generate ./... (#929)
This is part of the routine tasks before a release.

See https://github.com/ooni/probe/issues/2130
2022-09-04 17:33:22 +02:00
Simone Basso
ae0613fbb3
feat(ghpublish): choose (pre)release depending on tag (#928)
While there, include integration testing to make sure the script
is working as intended before using it.

While there, edit maketarball.bash's comments.
2022-09-03 12:11:19 +02:00
Simone Basso
7df25795c0
fix(probeservices): use api.ooni.io (#926)
See https://github.com/ooni/probe/issues/2147.

Note that this PR also tries to reduce usage of legacy names inside unit/integration tests.
2022-09-02 16:48:14 +02:00
Simone Basso
535be51cd1
fix(tracex): use HTTP transaction end time for t (#925)
This issue was mentioned in https://github.com/ooni/probe/issues/2137.

I double checked the spec and this field is not mentioned. We will
update it when we do https://github.com/ooni/probe/issues/2238.
2022-09-02 15:10:57 +02:00
Simone Basso
1153850aca
cleanup: doh.powerdns.org is not working anymore (#924)
While there, `.../internal/sessionresolver` => `.../sessionresolver`

See https://github.com/ooni/probe/issues/2255
2022-09-02 14:44:23 +02:00
Simone Basso
ec73ae20b4
fix(dnscheck): trim the static input list (#923)
This should make the measurements faster since users have been
complaining about "experimental" taking too much time.

See https://github.com/ooni/probe/issues/2234
2022-09-02 13:54:59 +02:00
Simone Basso
7cdcf9f15b
fix(dnscheck): record whether residual is enabled (#922)
The residual censorship algorithm prevents dnscheck for checking the
same endpoint again in a short time frame under the assumption that a
previous measurement could have caused residual censorship.

In https://github.com/ooni/probe/issues/2234, we mentioned we probably
wanted to disable this algorithm because we didn't want to slow down
dnscheck too much and because we didn't detect this alleged source of
blocking in our previous measurements.

It turns out the algorithm was already disabled. I probably did this
after we published the paper on DNS censorship to make measurements
overall a bit faster.

So, just introduce a new extension field to the measurement telling us
that the residual censorship algorithm is disabled.

It's not super useful except as for the fact that the next time I
read the source code I notice that the algorithm is disabled.
2022-09-02 13:31:24 +02:00
Simone Basso
0c2744e994
feat(rolling): build fresh binaries every night (#920)
Part of https://github.com/ooni/probe/issues/2249
2022-09-01 19:57:31 +02:00
Simone Basso
a68472dcee
dnscheck: bump patch version number (#919)
Part of https://github.com/ooni/probe/issues/2234
2022-09-01 19:23:46 +02:00
Simone Basso
cee89132af
fix(dnscheck): lower the default timeouts (#917)
Closes https://github.com/ooni/probe/issues/2234
2022-09-01 15:45:42 +02:00
Simone Basso
860426b874
doc: document the minioonirunv2 functionality (#916)
Closes https://github.com/ooni/probe/issues/2184
2022-08-31 19:51:31 +02:00
Simone Basso
d0da224a2a
feat(oonirun): improve tests (#915)
See https://github.com/ooni/probe/issues/2184

While there, rename `runtimex.PanicIfFalse` to `runtimex.Assert` (it was about time...)
2022-08-31 18:40:27 +02:00
Simone Basso
a8a29cc0dd
fix(miniooni): handle panics with --repeat-every (#914)
Most of miniooni panics on errors. We should not panic on error with
--repeat-every, rather we should try the next measurement.

See https://github.com/ooni/probe/issues/2250
2022-08-31 13:07:24 +02:00
Simone Basso
0bc6aae601
feat(miniooni): make CLI much more user friendly (#913)
Part of https://github.com/ooni/probe/issues/2184, because I wanted
to allow swapping commands and options more freely.

As a side effect, this PR closes https://github.com/ooni/probe/issues/2248.

AFAICT, every usage that was legal before is still legal. What has
changed seems the freedom to swap commands and options and a much
better help that lists the available options.
2022-08-31 12:44:46 +02:00
Simone Basso
7daa686c68
refactor(miniooni): divide et impera (#912)
This diff splits miniooni's implementation in smaller and more
easily tractable blocks ahead of future refactoring.

I'm trying to make `miniooni oonirun -i URL` as possible as
`miniooni -i URL oonirun`, because users typically expect this
kind of flexibity from modern Unix commands.

Part of https://github.com/ooni/probe/issues/2184
2022-08-31 10:20:04 +02:00
Simone Basso
196ac55493
fix: attempt to make linux builds faster (#911)
This work aims to make Linux builds faster to make https://github.com/ooni/probe/issues/2249 more convenient. Since those builds runs inside Docker, the problem to solve here is to save/restore the Go caches notwithstanding Docker. Because Docker runs as root, we need to modify the build a bit to run as a normal user. Otherwise, we will not be able to save the Go cache using actions/cache@v3. (Other approaches such as using `sudo` are possible but running the build as an unprivileged user actually looks cleaner, so I chose to do that.) While there, add a `.editorconfig`.
2022-08-30 21:13:33 +02:00
Simone Basso
d10ab88444
feat: implement rolling builds (#910)
This diff modifies all the github actions that produce assets to
publish on a release called rolling when we are not building a tag.

If everything goes as planned, we should be able to provide
people with automatically generated fresh binaries for testing.

While there, introduce caching for all builds to make them
as fast as possible. I suspect gomobile based builds will not
see any speed up but other builds most likely will.

See https://github.com/ooni/probe/issues/2249
2022-08-30 15:29:09 +02:00
Simone Basso
d1b172f3ac
fix: attempt to make android builds faster (#909)
After https://github.com/ooni/probe-cli/pull/908, the Android
build has become super slow, because we build serially.

Attempt to make it faster by building in parallel.

Still part of https://github.com/ooni/probe/issues/2119, because
I don't feel happy with a super slow build.
2022-08-30 12:09:01 +02:00
Simone Basso
0d57899f46
feat: stop cross compiling miniooni (#908)
See https://github.com/ooni/probe/issues/2119

While there, shrink the Makefile to only export the minimum
set of rules to comfortable build using GHA.
2022-08-30 11:36:59 +02:00
Simone Basso
d48d44b880
feat: build miniooni and ooniprobe for android (#907)
This diff introduces a build script, makefile rules, and github actions
rules to build and public android CLI releases.

See https://github.com/ooni/probe/issues/1723
2022-08-30 09:37:15 +02:00
Simone Basso
705589bbe1
fix(oohelperd): measurement -> wctask (#906)
Make sure we don't say measurement in metrics.

See https://github.com/ooni/probe/issues/2183#issuecomment-1230327725
2022-08-29 18:52:30 +02:00
Simone Basso
42b547d311
fix: repair the Android build (#905)
Rather than hardcoding the NDK version inside a script, encode it
as a file in the filesystem, which is easier to share.

Make sure we use the desired NDK by setting environment variables.

Use `-androidabi 21`, which:

1. is what rclone did: 8390ba4ca9

2. is the minimum ABI used by probe-android: 994651be52/app/build.gradle (L10)

Part of https://github.com/ooni/probe/issues/2130
2022-08-29 18:51:25 +02:00
Simone Basso
9e38ee5135
feat: build ooniprobe for armv6 (#904)
Part of https://github.com/ooni/probe/issues/1753.

While there, introduce a rule by which, if the branch is named `fullbuild` we run all possible builds. It helps to test all the builds without creating a release branch. Because release branches are protected, they cannot be deleted easily. On the contrary, the `fullbuild` branch can easily be disposed of.
2022-08-29 17:33:42 +02:00
Simone Basso
8c855ca597
fix(oohelperd): metrics improvements after design review (#903)
This diff updates the metrics according to https://github.com/ooni/probe/issues/2183#issuecomment-1230327725
2022-08-29 16:36:46 +02:00
Simone Basso
ffc2527fc5
fix: repair broken linux-static build (#902)
The issue here is that the repository is owned by the user who
runs the command and the container runs as root.

Part of https://github.com/ooni/probe/issues/2130
2022-08-29 15:45:41 +02:00
Simone Basso
4ce414d104
chore: we're now hacking on v3.16.0-alpha.2 (#901)
Just a chore commit to increase the version given that we just tagged v3.16.0-alpha.1
2022-08-29 09:35:17 +02:00
Simone Basso
37632f60d9
fix: repair releasing miniooni and ooniprobe-windows (#900)
It seems several CI builds failed for [v3.16.0-alpha](https://github.com/ooni/probe-cli/releases/tag/v3.16.0-alpha). Let's aim to repair miniooni and ooniprobe-windows for now. The other failing builds seem more tricky. (Android fails with an unsupported NDK while Linux fails with issues accessing the git repository from Docker, probably because the  the user running inside Docker is not the user that owns the repository.)
2022-08-29 00:48:46 +02:00
Simone Basso
90089d4d8f
chore: we're now hacking on v3.16.0-alpha.1 (#899)
Just a chore commit to increase the version given that we just tagged v3.16.0-alpha
2022-08-29 00:29:01 +02:00
Simone Basso
9bd1c5ff20
fix(oohelperd): refuse to measure bogons (#898)
See the explanatory newly-added comment for more information.

Closes https://github.com/ooni/probe/issues/2064
2022-08-29 00:06:57 +02:00
Simone Basso
dcdd8fb712
feat(oohelperd): add prometheus metrics (#897)
Closes https://github.com/ooni/probe/issues/2183

While there, avoid exposing nil values for optional fields of the
THResponse struct (i.e., "ip_info" and "tls_handshake").

While there, fix `measurexlite`'s `OperationLogger` test
and make it deterministic rather than racy.
2022-08-28 23:54:22 +02:00
Simone Basso
4241ee4bc1
feat(oohelperd): log messages at info level (#896)
We're using a request-specific logger where we also print the ID
of the request. This design helps to observe logs produced by
concurrent requests.

Part of https://github.com/ooni/probe/issues/2183

While there, fix https://github.com/ooni/probe/issues/2241
2022-08-28 22:26:58 +02:00