ooni

package module
v3.0.0-beta.1+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

README

OONI Probe CLI

The next generation OONI Probe Command Line Interface.

Development setup

Be sure you have golang >= 1.8.

This project uses dep with the vendor/ dir in .gitignore.

Once you have dep installed, run:

dep ensure

Next, you'll need a recent version of Measurement Kit.

Building a ooni binary for windows and macOS is currently only supported on a macOS system.

For building a linux ooni binary, you will need a linux system and follow the intruction in the linux section.

macOS

On macOS you can build a windows and macOS ooni binary.

This can be done by running:

make download-mk-libs

This will download the prebuilt measurement-kit binaries.

Then you can build a macOS build by running:

make build

And a windows build by running:

make build-windows
linux

On linux you will have to make your own build of measurement-kit and the required dependencies.

The following instructions have been tested on debian stretch, but should work on any other modern debian equivalent with minor tweaks.

Install the required depedencies:

sudo apt-get install git build-essential cmake autoconf libtool golang libc++-dev

Note: be sure you have golang at >= 1.8 (debian stretch means using backports).

git clone https://github.com/measurement-kit/script-build-unix.git
cd script-build-unix

Then build measurement-kit as follows:

./build-linux geoip-api-c
./build-linux libressl
./build-linux libevent
./build-linux measurement-kit

You should now have a set of compiled libraries inside of MK_DIST. Take this and copy it into vendor/github.com/measurement-kit/go-measurement-kit/libs/linux.

It should now be possible to build ooni by running:

make build

To run internal tests do:

make test-internal

Documentation

Index

Constants

View Source
const Version = "3.0.0-beta.1"

Variables

This section is empty.

Functions

func InitDefaultConfig

func InitDefaultConfig(home string) (*config.Config, error)

InitDefaultConfig reads the config from common locations or creates it if missing.

func MaybeInitializeHome

func MaybeInitializeHome(home string) error

MaybeInitializeHome does the setup for a new OONI Home

Types

type Context

type Context struct {
	Config   *config.Config
	DB       sqlbuilder.Database
	Location *utils.LocationInfo
	IsBatch  bool

	Home    string
	TempDir string
	// contains filtered or unexported fields
}

Context for OONI Probe

func NewContext

func NewContext(configPath string, homePath string) *Context

NewContext instance.

func (*Context) Init

func (c *Context) Init() error

Init the OONI manager

func (*Context) LocationLookup

func (c *Context) LocationLookup() error

LocationLookup lookup the location of the user via geoip

func (*Context) MaybeDownloadDataFiles

func (c *Context) MaybeDownloadDataFiles() error

MaybeDownloadDataFiles will download geoip data files if they are not present

func (*Context) MaybeLocationLookup

func (c *Context) MaybeLocationLookup() error

MaybeLocationLookup will lookup the location of the user unless it's already cached

func (*Context) MaybeOnboarding

func (c *Context) MaybeOnboarding() error

MaybeOnboarding will run the onboarding process only if the informed consent config option is set to false

Directories

Path Synopsis
cmd
ooni command
internal
log/handlers/cli/progress
Package progress provides a simple terminal progress bar.
Package progress provides a simple terminal progress bar.
im
pkg
gobash module
strcase
Package strcase converts strings to snake_case or CamelCase
Package strcase converts strings to snake_case or CamelCase

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL