qBittorrent Support For BitTorrent 2.0 Is Looking Good

From LinuxReviews
Jump to navigationJump to search
Network-nfs.png

The popular multi-platform bittorrent client qBittorrent has gained support for libtorrent 2 and the BitTorrent 2.0 protocol in the git master tree at GitHub. There is no time-frame for a stable release using it.

written by 권유리 (Kwon Yu-ri)  2021-03-05 - last edited 2021-03-05. © CC BY

Qbittorrent-v4.4.0alpha1.jpg
Qbittorrent v4.4.0alpha1 seeding Mageia Linux 8.

BitTorrent 2.0, defined in BEP52 all the way back in January 2008, is a big upgrade to the existing BitTorrent protocol. It uses SHA-256 instead of the now very insecure SHA-1 hash algorithm, it has a much more efficient directory structure in the .torrent files and the pieces of files within a torrent are represented by merkle hash trees.

One potentially fun advantage of the new .torrent file format is that individual files within a .torrent get their own hash. That could be used to participate in two or more public swarms if two or more torrents happen to contain the same file(s). There is no code for such a cross-leaching feature as of today, but is in theory quite possible.

BitTorrent clients have been very slow to implement the new BitTorrent 2.0 protocol. libtorrent-rasterbar 2.0, released in October 2020, was the first widely used BitTorrent library to full support it and all its features.

The popular qBittorrent client, available for macOS newer than High Sierra, Windows 7+ and Linux, is built on the libtorrent-rasterbar library. The latest stable v4.3.3 release from January 2021 uses libtorrent-rasterbar 1.2.

The current qBittorrent git tree can now be built against libtorrent-rasterbar v2.0.2. Doing so enables most of the new features BitTorrent 2.0 offers. It is still possible to build qBittorrent git against libtorrent-rasterbar 1.2.12 in case anyone prefers the old and more widely tested library.

Compile-qbittorrent-v4.4.0-alpha1.jpg
qBitTorrent git being compiled against libtorrent-rasterbar 2.0.2. There's lots of warnings..

qBittorrent is currently not capable of taking full advantage of libtorrent-rasterbar 2.0.2 in all areas. It will sometimes use a SHA1 hash when it should be using a SHA256 hash and there are some other minor issues that should be resolved before there is a public release with rebuilt binaries using libtorrent-rasterbar 2.

None of the qBittorrent developers were willing to event hint at when a qBittorrent release using libtorrent-rasterbar 2 will take place. There is, on the other hand, a time-frame for when a qBittorrent release ported to the new Qt6 toolkit (qBittorrent is currently built against Qt5) will take place:

"We won't be moving to Qt 6.x until the end of the year, possibly even this time [March] next year."

anonymous qBittorrent developer source

Those who want to try qBittorrent git with libtorrent-rasterbar 2 can acquire the source for libtorrent-rasterbar 2 from github.com/arvidn/libtorrent/releases and compile it with:

tar xf libtorrent-rasterbar-2.0.2.tar.gz
cd libtorrent-rasterbar-2.0.2/
mkdir build ; cd build
cmake -DCMAKE_CXX_STANDARD=11 ..
make -j$(nproc)
sudo make install

and checkout and compile the qBittorrent git tree with:

git clone https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent
./bootstrap.sh
./configure --prefix=/usr/local 
make -j$(nproc)
su
make install

Note that you will have a problem compiling qBittorrent if you don't configure libtorrent-rasterbar with -DCMAKE_CXX_STANDARD=11.

qBittorrent is mostly developed by just three people: sledgehammer999, who values his/her privacy, Mike Tzou, from Taiwan, and Vladimir Golovnev. There are currently 2261 open issues at the projects issue tracker so it is safe to assume that they would appreciate the help of you are a developer with spare time to spend on a popular and widely used free software project.

5.00
(one vote)


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.