BitStorm is a super-thin bittorrent tracker written in PHP which does not require a database. BitStorm was originally written by Peter Caprioli as a lightweight bittorrent tracker contained in a single PHP file. As it used only a single flat file as a database, it had difficulty scaling past ~10 announces per second. You can find more detail here Peter has rewrote the code with MySQL support. Josh Duff forked the beta MySQL code and published it on Google Code, allowing it to scale a huge numbers of peers.
This version is rewrited based on the bitstorm using redis as its database.
Tracker is an HTTP/HTTPS service which responds to HTTP GET requests from bittorrent clients such as utorrent. In a word, a tracker maintains information about which peers are downloading a common file. Read BitTorrent Protocol Specification for a brief introduction about bittorrent and tracker. More detailed Specification can be found in wiki.theory.org and wiki.bitcomet.com.
# | key | expire | value-type | value |
---|---|---|---|---|
1 | torrents | NA | set | info_hash1,info_hash2... |
2 | info_hash | NA | set | peer_id1,peer_id2... |
3 | info_hash:peer_id | 1860s | hash | ip4,ip6,port,seed |
- info_hash: sha1 hash of the bencoded form of the info value from the metainfo file(.torrent file), can identify the real file to be transfered.
- peer_id: identifier of client, generated/changed by the client at startup. Another similay parameter is key which is identifier of client and generated/changed by the client when a new session starts.
- seed: a peer is seeding when he has 0 bytes left to download, otherwise he is leeching.
- Redis as storage.
- Both ipv4 and ipv6 supported. The compact field is ignored to support ipv6.
- NAT are naturally supported without extra effort.
- A stats page using datatable.
- Place the contents in the document root of a php-supported server.
- Run
composer install
to download Predis. - Make sure your redis server can be accessed.
- Make a torrent and fill tracker as the following URLS(If port absents, 80 will be used)
http://youripv4:port/announce
http://[youripv6]:port/announce
- Visit
http://yourip:port/announce
orhttp://yourip:port/stats.php
in a broswer to see the statistics of the running tracker.