30 06 | 2011

A new BitTorrent metainfo generator

Written by Tanguy

Classified in : Homepage, Debian

Trying the BitTorrent DHT

A month ago, noticing that there was a lack of a good BitTorrent tracker software (good meaning “complying with my random requirements”), I considered writing a new tracker. Then someone pointed out that I could try using the dynamic hash table or DHT, a BitTorrent extension that removes the need for a tracker, relying on the swarm or BitTorrent clients to do the tracking work.

Indeed, the DHT may be a nice solution to this problem because it has several advantages:

  • it relies on the BitTorrent clients themselves, that are far more commonly used that BitTorrent trackers and thus more developed;
  • this feature seems to be rather well adopted by the common BitTorrent client software;
  • it already exist and seems to work rather well!

So, I went to try distributing trackerless torrents using the DHT. But with BitTorrent, file distribution is initiated using metainfo files, commonly called “torrent files” or simply “torrents”, so I needed a tool to generate trackerless metainfo files.

Writing a new metainfo generator

I did not find such a tool. The generators I found did not implement that extension and they were composed of many lines of C code, which I really did not want to dig into in order to extend them. So here it is, gentorrent, a BitTorrent metainfo generator written in Python 3 and distributed under the license AGPLv3, which proved rather easy.

I think it is fast enough, taking about ten seconds to calculate the metainfo for a file of one gibibyte. It implements all the BitTorrent extensions related to metainfo files, such as trackerless torrents, HTTP/FTP seeding or Merkle trees. Do not hesitate to test it and to send me comments, criticism or suggestions for a cooler name.

Now that I have a tool to generate trackerless torrents, I shall test the DHT more extensively and document this way of publishing files. If you are interested in this topic, e.g. you are maintaining a distribution system based on the antique BitTornado, stay tuned.

01 06 | 2011

Coding a new BitTorrent tracker?

Written by Tanguy

Classified in : Homepage, Debian

The BitTorrent protocol works with trackers, that track the clients or peers that share a given file. This is one specific design of a peer-to-peer protocol, very appropriate for official distribution: for instance, Debian runs a tracker for distributing the installation images.

Read more Coding a new BitTorrent tracker?

Archives