Commit Graph

1196 Commits

Author SHA1 Message Date
Arturo Filastò
d51b535153 Add document outlining the differences between probe-cli and probe-legacy 2019-11-29 17:18:28 +01:00
Simone Basso
430a53e7d6
build.sh: re-enable psiphon (#81)
To test this, I'll create a fake release locally and make sure
the resulting binary is much larger. If you see this commit landing
on a PR, then it means I successfully run this check.
2019-11-29 16:17:37 +01:00
Arturo Filastò
222b0bfbca Bump version number 2019-11-14 18:03:31 +01:00
Arturo Filastò
e0160b5881 Bump probe-engine 2019-11-14 18:02:18 +01:00
Arturo Filastò
8a27de6c7d
Remove all settings which are not implemented (#73)
* Remove all settings which are not implemented

* Add support for migrating config files from version 0 -> 1

Add basic unittests for the config file migration

* Update the config file used by travis

* Fix typos in console log messages

* Improve the comment

* Fix type of limit

* Set informed consent to true in the travis config
2019-11-14 17:58:31 +01:00
Simone Basso
e5248d632b
build.sh: produce smaller binaries (#72)
* don't include psiphon until we need it

* strip the binaries
2019-11-14 12:20:04 +01:00
Arturo Filastò
bc1314ca61
Add support for calculating the estimate time remaining (#71) 2019-11-14 12:01:40 +01:00
Simone Basso
0c6862bb87 Readme.md: we require Go >= 1.13 now
While there, make sure the markdown output is not confusing.
2019-11-14 10:14:25 +01:00
Simone Basso
a9b2edc88e Readme.md: briefly document release procedure 2019-11-13 18:31:19 +01:00
Simone Basso
90c497873a
Merge pull request #70 from ooni/release/rc-2
Release 3.0.0-rc.2
2019-11-13 17:47:29 +01:00
Simone Basso
25008f9ffa Bump to v3.0.0-rc.2 2019-11-12 16:45:54 +01:00
Simone Basso
0bee29bc21 Upgrade to github.com/ooni/probe-engine@v0.2.0 2019-11-12 16:45:24 +01:00
Simone Basso
e97d21e844
Merge pull request #69 from ooni/release/rc-1
Bump to 3.0.0-rc.1
2019-11-12 16:43:22 +01:00
Arturo Filastò
68c2866ee9 Bump to 3.0.0-rc.1 2019-11-04 07:46:49 +08:00
Simone Basso
946289d6fe
Use more general ooni/probe-engine API (#67)
No functional change, just importing less stuff and meddling
much less with the internals of ooni/probe-engine.
2019-10-28 14:05:05 +01:00
Simone Basso
1b9bc457b9
Merge pull request #65 from ooni/issue/64
build.sh: produce same release as before
2019-10-03 23:40:38 +02:00
Simone Basso
2986cbcb25
Update build.sh
Co-Authored-By: Sarath <sarath.ms@gmail.com>
2019-10-03 23:34:41 +02:00
Simone Basso
a8f8c65ffb build.sh: produce same release as before 2019-10-03 20:33:20 +02:00
Simone Basso
1d8becf50f
Merge pull request #62 from ooni/feature/release
Publish code used to generate v3.0.0-beta.4
2019-10-03 12:25:16 +02:00
Simone Basso
839b51237d Temporarily remove goreleaser
For now, I'm fine with `./build.sh release`. When we'll be fully
written in Go, we'll explorer more perks.
2019-10-03 12:15:19 +02:00
Simone Basso
f3193b4a7c build.sh: add target to build release
While there, remove non actionable warning.
2019-10-03 11:45:49 +02:00
Simone Basso
a488c8d2a3 version.go: actually bump version
Classic mistake: you don't bump the version.

We need https://github.com/ooni/probe-cli/issues/43.
2019-10-03 11:22:13 +02:00
Simone Basso
7cde93fca4
Make sure ooniprobe show <id> is WAI (#61)
1. the description of the command and the helper function are
clear hints that the command is intended to show a single JSON
measurement at a time (also the use case seems clear) [*]

2. the function used to read lines was failing for all my
measurements that take input. Since that was not the optimal
pattern anyway, use a better pattern to fix it.

3. some changes are automatically applied by my editor (VSCode
with the Go plugin) and I am fine with them.

4. while reading code, I also applied my preferred pattern
wrt whitespaces, i.e.: no whitespace inside functions, if a
function feels too long in this way, just break it.

Closes #57

[*] Even if we want to show many measurements at a time, which
does not seem needed, given the UI patterns, this functionality
won't be P0. What is P0 is to bless a new beta and give to
@sarathms binaries for all archs that support a basic `show`.
2019-10-03 11:18:07 +02:00
Simone Basso
f3865d2ec0
Upgrade to ooni/probe-engine@v0.1.1 (#60) 2019-10-03 09:43:25 +02:00
Simone Basso
23c8df1f0c
Rename the binary as ooniprobe (#58)
While there run the build container as unpriv user.
2019-10-02 19:27:15 +02:00
Arturo Filastò
f425d3f007 Implement the show command (#53) 2019-10-02 18:23:14 +02:00
Simone Basso
b9b555ba68 Integrate further with ooni/probe-engine: episode two (#46)
* utils/geoip.go: use github.com/ooni/probe-engine

Let's start using the engine by rewriting utils/geoip.go to
be just a thin wrapper around the engine functionality.

* Ready for review

* Checkpoint: the im tests are converted

Still have some doubts with respect to the variables that
are passed to MK via probe-engine. Will double check.

* fix(i/c/r/run.go): write the correct logic

* nettests: one more comment and also fix a format string

* Tweak previous

* progress

* Fix doofus

* better comment

* XXX => actionable comment

* Add glue to simplify test keys management

Making the concept of measurement more abstract in the engine is
not feasible because, when submitting a measurement, we need to
modify it to update the report ID and the measurement ID. Therefore,
returning a serialized measurement is not a good idea. We will
keep using a model.Measurement in the engine.

Changing model.Measurement.TestKeys's type from a `interface{}`
pointing to a well defined data structure to `map[string]interface{}`
is a regression because means that we are moving from code that
has a clear and defined structure to code that is more complicated
to parse and validate. Since we're already suffering havily from
the lack of a good schema, I'm not going to make the situation
worst by worsening the engine. At least for ndt7 and psiphon, we
now have a good schema and I don't want to lose that.

However, the current code in this repository is expecting the
test keys to be a `map[string]interface{}`. This choice was
dictated by the fact that we receive a JSON from Measurement Kit
and by the fact that there's not a clear schema.

To solve this tension, in this commit I am going to write glue
adapter code that makes sure that the TestKeys of a Measurement
are converted to `map[string]interface{}`. This will be done
using a type cast where possible and JSON serialization and parsing
otherwise. In a perfect world, glue is not a good idea, but in a
real world it may actually be useful.

When all tests in the engine will have a clear Go data structure,
we'll then remove the glue and just cast to the proper data
structure from `interface{}` where required.

* nettests/performance: use probe-engine

* go.{mod,sum}: upgrade to latest probe-engine

* nettests/middlebox: use ooni/probe-engine

* Update to the latest probe-engine

* web_connectivity: rewrite to use probe-engine

* Cosmetic change suggested by @hellais

* nettests/nettests.go: remove unused code

* nettests/nettests.go: fix progress

* nettests/nettests.go: remove go-measurement-kit code

* We don't depend on go-measurement-kit anymore

* Improve non-verbose output where possible

See also: https://github.com/measurement-kit/measurement-kit/issues/1856

* Make web_connectivity output pleasant

* Update to the latest probe-engine

* nettests/nettests.go: honour sharing settings

* Update to the latest probe-engine

* Use log.WithFields for probe-engine

* Update go.mod go.sum

* Revert "Update go.mod go.sum"

This reverts commit 5ecd38d8236f4a4e9b77ddb8e8a0d1e3cdd4b818.

* Revert "Revert "Update go.mod go.sum""

This reverts commit 6114b31eca98826112032776bd0feff02d763ecd.

* Upgrade ooni/probe-engine

* Unset GOPATH before running go build commands

* Dockefile: fix linux build by using latest

* Update to the latest ooni/probe-engine

```
go get -u github.com/ooni/probe-engine
go mod tidy
```

* Repair build
2019-08-15 18:08:43 +02:00
Simone Basso
df629237be
Use ooni/probe-engine: episode 1 (#42) 2019-05-23 16:38:46 +02:00
Arturo Filastò
eb4fec2f21 Add commands for making a release 2019-05-16 15:41:57 +02:00
Arturo Filastò
e9bd5d8eb5
Merge pull request #33 from ooni/release/3.0.0-beta.3
Bump version
2019-05-16 15:00:17 +02:00
Arturo Filastò
23423cd74f Put MK loglevel to info 2019-05-16 10:22:29 +02:00
Arturo Filastò
6afc8bcc94 Remove reference to caBundlePath 2019-05-15 19:30:10 +02:00
Arturo Filastò
4ead3802a4 Bump MK verbosity and print SSL_CERT value 2019-05-15 19:29:34 +02:00
Arturo Filastò
2cda2d9639 Bump version 2019-05-15 19:26:24 +02:00
Arturo Filastò
9155ec95ae Remove getCaBundlePath 2019-05-15 19:25:23 +02:00
Arturo Filastò
9ad7c6507a Remove shutil tests 2019-05-15 18:13:34 +02:00
Arturo Filastò
826822df31 Copy and delete instead of rename
Fixes: https://github.com/ooni/probe-cli/issues/21
2019-05-15 18:06:09 +02:00
Arturo Filastò
dbed661357 Vendor shutil from: bcacb06fec 2019-05-15 18:05:51 +02:00
Arturo Filastò
5134d9e0de Skip publish 2019-05-15 17:55:40 +02:00
Arturo Filastò
3f509370f2 Add release command 2019-05-15 17:55:11 +02:00
Arturo Filastò
a36181c9c0 Ignore dist in .dockerignore 2019-05-15 17:44:00 +02:00
Arturo Filastò
26feb2bcce Improve error reporting inside of geoip lookup functions 2019-05-15 17:36:56 +02:00
Arturo Filastò
5d0e6e6c8c Use info level MK debug 2019-05-15 16:14:01 +02:00
Arturo Filastò
356b655efd Enable debug mode 2019-05-15 15:34:36 +02:00
Arturo Filastò
f1dfe58351 Use a different env name for tests 2019-05-15 15:09:42 +02:00
Arturo Filastò
b01b038a05 Sync up goreleaser file 2019-05-15 15:05:24 +02:00
Arturo Filastò
1490d07089 Bump version number 2019-05-15 14:57:02 +02:00
Arturo Filastò
ea5feb40ec Add basic smoke test on travis 2019-05-15 14:55:47 +02:00
Arturo Filastò
72e5c99b51 Merge branch 'master' of github.com:ooni/probe-cli
* 'master' of github.com:ooni/probe-cli:
  Use MK v0.10.x, zap legacy GeoIP, build also on Linux (#29)
2019-05-15 14:48:32 +02:00
Simone Basso
9992690f8f Use MK v0.10.x, zap legacy GeoIP, build also on Linux (#29)
* Gopkg.lock: use MK v0.10.3

* ooni: stop using legacy GeoIP database files

* Some yak shaving of Makefile

1. remove now broken commands to download deps

2. also define the CXX cross compiler

* chore(dep): migrate from dep to go 1.11+ modules

See https://blog.callr.tech/migrating-from-dep-to-go-1.11-modules/

I need this to simplify my life in building for Travis.

* Introduce build.sh and repair build

In going forward, I believe we don't actually need a Makefile but I
didn't want to make such a radical change now.

* Another strategy wrt gopath

* travis: run regress tests on macOS

Closes #30
2019-05-15 15:48:06 +03:00