We're specifically pinning a commit of probe-engine that is using MK v0.10.11, so that we address the following issues: 1. we use db-ip.com for the country database as opposed to using the increasingly stale MaxMind database (see https://github.com/ooni/probe-engine/issues/334) 2. we're using an implementation of WhatsApp that does not suffer from the super-old CIDR bug (see https://github.com/ooni/probe-engine/issues/341) 3. we're not linking to libcurl anymore on Windows and Linux, thanks to this new version of MK where we can optionally disable libcurl; we are still linking to libcurl on macOS, but that has no impact on the binary size since on macOS libcurl is part of the system This should be enough, from my side to bless a new release of the probe-cli (see https://github.com/ooni/probe/issues/1028).
OONI Probe CLI
The next generation OONI Probe Command Line Interface.
User setup
-
Go into the releases and download the release for your architecture and platform
-
Extract the tarball with
tar xvzf ooniprobe_*.tar.gz -
Copy the
ooniprobebinary into a location in your$PATH, for example/usr/local/bin/ooniprobe -
Run
ooniprobe runto perform all the tests
Optional:
Add a crontab entry (on linux) to run ooniprobe daily at a random time:
(crontab -l 2>/dev/null; echo "$(( ( RANDOM % 60 ) + 1 )) $(( ( RANDOM % 24 ) + 1 )) * * * ooniprobe run") | crontab -
On macOS you can configure OONI Probe to run automatically using launchd.
Below is a sample launchd script, that should be placed inside of ~/Library/LaunchAgents/org.ooni.probe.cli.plist.
Be sure to replace /PATH/TO/BINARY/ooniprobe with the actual install location of the ooniprobe binary and /PATH/TO/CONFIG/config-100sites.json with the location of a file which limits the testing to 100 URLs.
You may also want to adjust the locations of the logs.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.ooni.probe.daily-run</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>Program</key>
<string>/PATH/TO/BINARY/ooniprobe</string>
<key>ProgramArguments</key>
<array>
<string>--config="/PATH/TO/CONFIG/config-100sites.json"</string>
<string>--batch</string>
<string>run</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
<key>StandardErrorPath</key>
<string>/tmp/ooniprobe-cli.err</string>
<key>StandardOutPath</key>
<string>/tmp/ooniprobe-cli.out</string>
</dict>
</plist>
Once you have written the file, you can enable to run automatically by doing: launchctl load org.ooni.probe.cli.plist.
Development setup
Be sure you have golang >= 1.13. We use golang modules. Run
./build.sh help
to get information on the supported systems as well as to get instructions on how to install dependencies.
Updating dependencies
-
update every direct dependency in
go.modexceptprobe-engineusinggo get -u -v $dependency -
pin to the latest version of the
probe-enginewithgo get -v github.com/ooni/probe-engine@tag -
remove all indirect dependencies from
go.modand merge the content ofprobe-engine'sgo.modinto ourgo.mod -
go mod tidy
The rationale of this procedure is that we want to pin exactly to a specific version of psiphon and of its dependencies.
Releasing
Make sure you have updated dependencies. Specifically, make sure you update homebrew to get the latest Measurement Kit. Then:
./build.sh release
and follow instructions.