opentracker – An open and free bittorrent tracker

Overview

opentracker is a open and free bittorrent tracker project. It aims for minimal resource usage and is intended to run at your wlan router. Currently it is deployed as an open and free tracker instance. Read our free and open tracker blog and announce your torrents there (but do not hesitate to setup your own free trackers!).


Version History

opentracker is currently only available from CVS. A tar ball will be rolled soon. Use cvs -d :pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co opentracker with an empty passwort to check it out. A cvsweb is available at opentracker cvsweb.


Build instructions

Until opentracker is declared official release ready, the way to install it is:

cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat
cd libowfat
make
cd ..
cvs -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co opentracker
cd opentracker
make

That should leave you with an exectuable called opentracker and one debug version opentracker.debug.


Invocation

opentracker can be run by just typing ./opentracker. This will make opentracker bind to 0.0.0.0:6969 and happily serve all torrents presented to it. If ran as root, opentracker will immediately chroot to . (or any directory given with the -d option) and drop all priviliges after binding to whatever tcp or udp ports it is requested to listen to by the -p and -P option respectively. One or more tracker ip addresses can be specified using -i. Note that, although multiple ip addresses can be bound to, only -p and -P actually does bind to the last ip address given with -i. See the example invocation below

Some features may be enabled in opentracker's Makefile. To control, which torrents your opentracker will serve, black or white listing can be enabled. Uncomment one of the -DWANT_BLACKLISTING -DWANT_CLOSED_TRACKER paramters in the FEATURES variable. Then pass your black or white list file, consisting of return separated 40 digit hex representations of your (blocked) torrents, to opentracker using -w or -b. NOTE: if you enable black and/or white listing in Makefile, opentracker will run in closed mode by default, so don't forget to actually enable your torrents.

Opentracker can deliver gzip compressed full scrapes. Enable this with -DWANT_COMPRESSION_GZIP in your Makefile.

Opentracker can respond to empty requests by HTTP redirecting to another URL, if told so with -r.

An example invocation would look like ./opentracker -i 23.23.23.7 -p 80 -P 80 -p 6969 -i 23.23.23.8 -p 80 -r http://www.mytorrentsite.com/ -d /usr/local/etc/opentracker -w mytorrents.list -A 127.0.0.1


Philosophy

A torrent tracker basically is an http-Server that collects all clients ip addresses into pools sorted by one of the request strings parameters and answers all other clients that specified this exact same parameter a list of all other recent clients. All technologies to implement this are around for more than twenty years. Still most implementations suck performancewise.

Utilizing the highly scalable server framework from libowfat, opentracker can easily serve multiple thousands of requests on a standard plastic WLAN-router, limited only by your kernels capabilities ;)

One important design decision of opentracker was to not store any data persistently. This reduces wear&tear on hard disks and eliminates problems with corrupt databases.


Syncing

opentracker allows several instances running in a cluster. Those clusters can be synced with a simple protocol extension proposed here and implemented in opentracker already:

GET /sync HTTP/1.* returns a bencoded dictionary containing a dictionary with all announces within a time frame of five minutes. Its format is: d4:syncd(20:HHHHHHHHHHHHHHHHHHHH[8*N]:(IIIIPPFF){N})*ee, where H is the info_hash (used as key in the inner dictionary) with N being the number of peers announcing that torrent within last five minutes, I being the ip address of one peer, P being its port number and F containing flags (whether peer is seeder, has sent an event=stopped or claims to have completed download).

Syncing data (maybe merged changesets from several nodes) back to your tracker is done by sending dictionary in your request: GET /sync?changeset=d4sync:d....ee (note, that you might need to url escape the dictionary).

Opentracker does only allow syncing to and from sources that have been blessed via -A.


Author

opentracker was written by Dirk Engling, who likes to hear from happy customers. His mail address is erdgeist@erdgeist.org.


Thanks

A project like this one is impossible without lots of help from friends. It is powered by beer, much energy and love, batches of bug reports and support on the operating system integration side by denis, taklamakan, cryx, supergrobi and – his libowfat always on the bleeding edge – Fefe. Thanks are also due to Hannes for helping me out with designing internal data representation.


License

opentracker is considered beer ware.