Skip to content
Nikos Filippakis edited this page Jun 22, 2017 · 12 revisions

go-dpi requires Go 1.7 or later, so you should install that first if you don’t have it.

sudo apt-get install golang-1.7-go

Besides that, the libraries nDPI and libprotoident are also required. They may be installed with the following commands.

echo "deb http://packages.wand.net.nz trusty main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y --force-yes install git gcc autoconf automake libtool libpcap-dev libtrace4 libtrace4-dev libprotoident libprotoident-dev
git clone --branch 2.0-stable https://github.com/ntop/nDPI/ /tmp/nDPI
cd /tmp/nDPI && ./autogen.sh && ./configure && make && sudo make install && cd -

You are now able to install the library! Glide is also installed in order to help with the management of the dependencies.

go get github.com/mushorg/go-dpi
go get github.com/Masterminds/glide
cd "$(go env GOPATH)/src/github.com/mushorg/go-dpi"
$(go env GOPATH)/bin/glide install

You are now ready to use the library from your own project! You should be able to confirm the installation is complete by going to the go-dpi directory and running the tests.

go test . ./wrappers ./classifiers
Clone this wiki locally