Thursday, December 08, 2005

Simplified BitTorrent media distribution with µTorrent's internal tracker

Some of you may have read my previous review of µTorrent, a relatively new BitTorrent client that aims to provide many of the more advanced features provided by 'full-featured' clients such as Azureus without using massive amounts of computer resources.

Today I'm going to show you how to use µTorrent's undocumented internal tracker to track torrents, and along with DHT allow for simplified media distribution. But before we get started, you may want to know a little more about how BitTorrent works. Wikipedia has a lot of information that may be useful, but I've written an intro to the anatomy of a BitTorrent session which is a must-read for the rest of this article if you don't already know all about trackers.

It's tracking that we're looking at in this guide. Of course, this client is first and foremost just that - a client, and as such can download and seed torrents too (using another tracker). But it features a tracker, which many people don't know about.

The first thing you need to do to track using µT is find something to track. You may want to start just by grabbing any old thing off the net and seeding that; for testing purposes something around 5MB is good since it's quick to download and hash, but slow enough so that you have time to check out what's going on. Epitonic (a depository of free, legal, high-quality music) would be a good place to get such a file.

Now (and this is something you should have done already), you need to get connectable. I'm not going to waste my time telling you how since there are plenty of resources available online such as portforward.com. You need to be connectable to run a tracker, and it will have significant effects on your download speed with regular BT anyway.

Next, create the .torrent by using File > Create new .torrent.

Image of the .torrent creation dialog
What do I have against eBaum? Refer to ebaumsworldsucks.com.

PUT.YOUR.IP.HERE:PORT needs to be changed to your external IP (get it from here if you don't know what it is) and your connectable port (the one listed in Options > Preferences > Network Options). The final result should look something like http://65.212.23.89:5412/announce, although the numbers will differ.
Piece size can be changed if you really want to and know what you're doing. You should check Private torrent if you don't want people sharing peers with DHT - ie. you don't want the files leaked outside people who have access to the .torrent file. Click Create and save as when you've entered all the relevant data.

The torrent will appear in the main µT screen and begin seeding. However, there is one thing you should do to optimize speed (this may be necessary on some internet connections) and that is change your IP to localhost. Do this by double-clicking the torrent and replacing your IP with localhost, so that the above example would become http://localhost:5412/announce. Why didn't we do that when creating the .torrent? Well, localhost means the PC that the tracker is currently running on - it only works from that PC. If you had made a .torrent with localhost as the tracker, nobody would be able to connect to it.

You can now send the .torrent on to other people, upload it to the Internet, etc. and people will be able to download its payload - as long as you don't stop seeding that file or close µTorrent.

security concerns

Did you notice that there was no setting that needed to be activated in order to set up and configure the tracker?

This means that any connectable µTorrent user can be used to track a torrent. In my opinion, this presents a minor security risk, especially since it is extremely simple to abuse this fact to track your own torrents. Tracking of torrents containing copyrighted content is a legal grey area, however, should someone release a torrent that you unknowingly tracked, which becomes very popular and contains illegal content (eg. a leaked version of a new movie) it is likely that you or your ISP would at the least receive a cease-and-desist letter. Also, a popular torrent would use up a fair bit of bandwidth / computer resources (if you're just a regular home user) and could cause problems for you that way.

Any µT user (this can be done in most other BT clients, too) can get the details necessary to do this. Simply join a large swarm and open the Peers tab - you'll need to have the IP, Port and Client columns open for this, which can be done by right-clicking on any existing open columns and checking the columns you're missing. Click the Client column to sort by client after 'harvesting' a large number of peers (staying on the torrent for a while should achieve this) and look for the µTorrent users. Any user with an entry in the Port column is connectable, because you initiated communication with them. (Users with no entry here may be connectable, too, but it's simpler just to stick with outgoing connections.) You can then use the IP and port listed for them to run a tracker on their computer without them knowing. Harvesting several IP:ports using this method and embedding them all in a multi-tracker .torrent would make this much more reliable, since if one user were to shut down their client, the torrent would still be tracked.

Worse, there is no way to block this traffic port-wise, since it is on the same port as regular µTorrent traffic.

Disclaimer: I strongly discourage tracking any content on another's computer without their permission! Not only is this unethical, it is probably illegal in most countries, although I don't know enough to provide any details.

Update: There is something you can do to fix this problem now, if it concerns you. The latest beta version of µT, v1.2.3 beta, contains some new features including Unicode support from all Windows OSs past Windows 98, and an advanced option which is off by default to enable the internal tracker. Using this version instead will disable the internal tracker for you without affecting your other downloads. However, it is still a beta version, which means it is not as stable as current final versions. Hopefully, it will be completed soon and all clients will be auto-updated.

µTorrent is a great client, and the internal tracker a great feature. It makes it heaps simpler to self-track torrents and distribute media without mucking around with complicated, highly-configurable trackers.

However, I think that the above concerns need to be addressed - the simplest way would be just to disable the tracker by default, and make it only functional if you enable it in the advanced options dialog. This feature is now present in the latest beta of µT.

Additionally, I think that the µTorrent site should provide some documentation for the internal tracker, basically what I just did, since this is definitely a useful feature and I shouldn't have had to create a new thread on the forums to work out how to use it. (µT development, I give you permission to use anything from this guide in such documentation should you wish to create it.)

No comments: