Go to file
Arturo Filastò 7a992761a4
Merge pull request #110 from ooni/no-help
Remove help link from the default config
2020-02-13 14:21:37 +01:00
cmd/ooniprobe Rename the binary as ooniprobe (#58) 2019-10-02 19:27:15 +02:00
config Merge pull request #110 from ooni/no-help 2020-02-13 14:21:37 +01: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 Explicitly handle SIGINT 2020-02-07 15:33:37 +01:00
nettests Make log line be debug level 2020-02-12 15:08:36 +01:00
scripts Move launchd script into the Readme 2020-01-29 09:43:39 +01:00
testdata Remove help link from the default config 2020-02-12 15:09:59 +01:00
utils Use ~/.ooniprobe as the home directory (#101) 2020-01-27 15:19:32 +01:00
version Bump version number 2020-02-05 18:38:23 +01:00
.dockerignore travis: run goveralls inside the docker container 2019-12-26 19:13:25 +00:00
.gitignore Add build artifacts to .gitignore 2020-02-10 10:43:13 +01:00
.travis.yml travis: run goveralls inside the docker container 2019-12-26 19:13:25 +00:00
build.sh bash on bash 2020-01-30 11:38:30 +01:00
Dockerfile travis: run goveralls inside the docker container 2019-12-26 19:13:25 +00:00
go.mod go.mod go.sum: update all dependencies (#107) 2020-02-11 09:21:56 +01:00
go.sum go.mod go.sum: update all dependencies (#107) 2020-02-11 09:21:56 +01: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 ~/.ooniprobe as the home directory (#101) 2020-01-27 15:19:32 +01:00
Readme.md Add launchctl command to Readme 2020-01-29 09:45:51 +01: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 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

  1. update every direct dependency in go.mod except probe-engine using go get -u -v $dependency

  2. pin to the latest version of the probe-engine with go get -v github.com/ooni/probe-engine@tag

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

  4. 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

./build.sh release

and follow instructions.