Ocelot is a BitTorrent tracker written in C++, forked from WhatCD/Ocelot. It supports requests over TCP and can track IPv4/IPv6 peers.
- Support ipv6 protocol
- Discount on torrents, such as 100%, 50%, 30% free, which is supported by traditional tracker
- Statistics of users’ uploaded/downloaded volume size, last seed time, etc.
- Fixed some issues
Ocelot Compile-time Dependencies
- GCC/G++ (4.7+ required; 4.8.1+ recommended)
- Boost (1.55.0+ required)
- libev (required)
- MySQL++ (3.2.0+ required)
- TCMalloc (optional, but strongly recommended)
The Gazelle installation guides include instructions for installing Ocelot as a part of the Gazelle project.
Create the following tables according to the Gazelle database schema, i.e.
ocelot.conf(copied from template
ocelot.conf.dist) to your liking.
apt-get update apt-get install --no-install-recommends -y \ build-essential \ automake \ cmake \ default-libmysqlclient-dev \ libboost-iostreams-dev \ libboost-system-dev \ libev-dev \ libjemalloc-dev \ libmysql++-dev \ pkg-config ./configure --with-mysql-lib=/usr/lib/x86_64-linux-gnu/ \ --with-ev-lib=/usr/lib/x86_64-linux-gnu/ \ --with-boost-libdir=/usr/lib/x86_64-linux-gnu/ make && make install
- Run Ocelot:
If the service is to run in production, systemd is recommended to manage it.
Running Ocelot in Container
Prepare Docker Image
Run these commands from the root directory of this repository.
docker build . --no-cache -t gpw-ocelot:latest -f Dockerfile
If this is to deploy in production, remove
CXXFLAGS=-D__DEBUG_BUILD__ which is for testing purpose,
such as allowing peer connections from local networks
Start the containers
Gazellefirstly by following instructions GazellePW Getting Started
- The container can be started using the previously built image
gpw-ocelot:latest. We use
gazelleas parent here so that the containers under the same parent
gazellecan communicate with each other under the same network.
docker-compose -p ocelot up -d
Note: The following instructions are assumed that
gpw-ocelot) have already been running in
Register as a user from start webpage
Upload a torrent (may need to restart the
gpw-ocelotcontainer to reload torrents from database if
gpw-webis started with tracker disabled)
announcerequest for testing, here is an example:
curl 'http://127.0.0.1:34000/<YOUR PASSKEY>/announce?info_hash=<TORRENT INFO HASH ENCODED>&peer_id=-DE203s-TQaEVc.-mzuO&port=32777&uploaded=0&downloaded=0&left=0&corrupt=0&key=449DBE8D&event=completed&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0' --output temp
-c <path/to/ocelot.conf>– Path to config file. If unspecified, the current working directory is used.
-v– Print queue status every time a flush is initiated.
SIGHUP– Reload config
SIGUSR1– Reload torrent list, user list and client whitelist