Go to file
Simone Basso 770a822fd4 fix(build.sh): name macOS files after the darwin platform
This was what we used to do in the past. Spotted by @sarathms.
2020-08-24 19:24:46 +02:00
.github/workflows fix(build.sh): name macOS files after the darwin platform 2020-08-24 19:24:46 +02:00
CLI fix(build.sh): name macOS files after the darwin platform 2020-08-24 19:24:46 +02:00
cmd/ooniprobe Rename the binary as ooniprobe (#58) 2019-10-02 19:27:15 +02:00
config fix(config/parser.go): correct unlocking on error paths (#146) 2020-07-24 17:12:51 +02:00
data Remove help link from the default config 2020-02-12 15:09:59 +01:00
docs Address feedback from @bassosimone 2019-12-04 13:13:13 +02:00
internal WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
nettests fix(nettests/nettests.go): make sure we emit progress (#148) 2020-08-24 12:31:10 +02:00
testdata Remove help link from the default config 2020-02-12 15:09:59 +01:00
utils utils/strcase: remove vendored package (#115) 2020-02-24 12:31:42 +01:00
version WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
.gitignore WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
build.sh fix(build.sh): name macOS files after the darwin platform 2020-08-24 19:24:46 +02:00
go.mod WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
go.sum WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
LICENSE.md Add LICENSE.md 2018-07-11 18:06:27 +02:00
ooni_test.go Allow to specify custom software name and version (#94) 2019-12-29 14:07:57 +01:00
ooni.go Use ooni/probe-engine 0.12.0+patches (#133) 2020-06-04 11:19:38 +02:00
Readme.md WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
smoketest.sh WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00
updatebindata.sh WIP: Start preparing release v3.0.7 (#147) 2020-08-22 11:20:50 +02:00

OONI Probe CLI

The next generation OONI Probe Command Line Interface.

User setup

  1. Go into the releases and download the release for your architecture and platform

  2. Extract the tarball with tar xvzf ooniprobe_*.tar.gz

  3. Copy the ooniprobe binary into a location in your $PATH, for example /usr/local/bin/ooniprobe

  4. Run ooniprobe run to 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 ooniprobe to run automatically by doing: launchctl load org.ooni.probe.cli.plist.

Development setup

Be sure you have golang >= 1.14 and a C compiler (when developing for Windows, you need Mingw-w64 installed). The most basic build command is:

go build -v ./cmd/ooniprobe

To compile a release used the build.sh script. For more information

./build.sh help

The output generated by this command should provide you with updated information regarding the pre-requisites for building (and cross-building) ooniprobe as well as useful information regarding cross compiling.

To update bundled binary data use:

./updatebindata.sh

Updating dependencies

  1. update every direct dependency in go.mod except probe-engine using go get -u -v $dependency:
for name in `grep -v indirect go.mod | grep -v probe-engine | awk '/^\t/{print $1}'`; do \
  go get -u -v $name;                                                                    \
done
  1. pin to the latest version of the probe-engine with go get -v github.com/ooni/probe-engine@TAG

  2. remove all indirect dependencies from go.mod and merge the content of probe-engine's go.mod into our go.mod

  3. 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. Then run

./build.sh release

and follow instructions.