README.md 2.7 KB

LibBT2

Description:

The LibBT2 bittorrent library is an attempt to modernise the original LibBT. LibBT was a C reimplementation of the BitTorrent core protocols. The goal for the project was to develop a low overhead library version of the protocols so that BitTorrent transfers can easily be built in to any existing application. LibBT2 is inspired by the same goals as LibBT and aims to carry the same torch forward.

Unfortunately, LibBT hasn't been maintained, developed, nor apparently even discussed in over a decade. The libbt-devel mailing list is a bot-infested graveyard with no meaningful discussion since 2006. Aside from having a dated code base, LibBT lacks features expected these days, such as the ability to parse magnet links, and use Kademlia distributed hash tables for trackerless peer discovery. LibBT2 aims to correct this situation.

The sample applications included with LibBT/LibBT2 currently run in between 2Mb and 3.5Mb of memory (RSS), depending on the number of peers that are attached.

LibBT was primarily targeted at the Linux Operating System but with some support for other OSes, including the Windows of the day. LibBT2 will most likely only target Linux, although collaboration with developers from the BSDs would be welcome.

The reason not to use libtorrent is that it sucks.

Prerequisites:

The following libraries should already be installed on your system:

If you are building prerequisite libraries from source then don't forget to add the library install directory to /etc/ld.so.conf, and run ldconfig, or add the library directory to your LD_LIBRARY_PATH environment variable.

Build instructions:

After unpacking the source tree you will find that the project has been set up to build with autoconf. The sources have only been tested on various Redhat distributions of Linux. Please let me know if you complete a port to another distribution or operating system.

To build the sources you must first run configure, and then make as shown in the example below.

$ ./configure
$ make

In this early release there is only a static library available, together with three sample applications; btlist, btget, and btcheck. There is currently no 'make install' target, but the sample applications can be copied anywhere that you find convenient, and should still run.

If changing the autoconf scripts then the following commands will rebuild the configure and config.h.in files:

$ autoconf
$ configure
$ autoheader
$ configure