Difference between revisions of "Libtorrent"

From I2P Wiki
Jump to navigation Jump to search
m (fix sam redlink)
m (add examples sections)
Line 11: Line 11:
 
= Examples =
 
= Examples =
   
  +
== libtorrent ==
 
For libtorrent's client_test program (available with source, a basic full impl. of libtorrent), the following command can be used to leech/seed a magnet (this example shows I2P+'s 2.1.0 Windows installer) through I2P (by [https://github.com/arvidn/libtorrent/issues/7262#issuecomment-1383848366 Vort]):
 
For libtorrent's client_test program (available with source, a basic full impl. of libtorrent), the following command can be used to leech/seed a magnet (this example shows I2P+'s 2.1.0 Windows installer) through I2P (by [https://github.com/arvidn/libtorrent/issues/7262#issuecomment-1383848366 Vort]):
   
 
<pre>examples/client_test --enable_dht=false --proxy_type=i2p_proxy --i2p_hostname=127.0.0.1 --i2p_port=7656 'magnet:?xt=urn:btih:889401025a1c16bbf9d8001ae157679507a87feb&dn=I2P%2B+Universal+Installer+2.1.0%2B&tr=http://tracker2.postman.i2p/announce.php'</pre>
 
<pre>examples/client_test --enable_dht=false --proxy_type=i2p_proxy --i2p_hostname=127.0.0.1 --i2p_port=7656 'magnet:?xt=urn:btih:889401025a1c16bbf9d8001ae157679507a87feb&dn=I2P%2B+Universal+Installer+2.1.0%2B&tr=http://tracker2.postman.i2p/announce.php'</pre>
   
You can press 'h' within client_test to see the available options
+
You can press 'h' within client_test to see the available options.
   
  +
== qBittorrent ==
 
For qBittorrent, until the I2P support is added<ref>https://github.com/qbittorrent/qBittorrent/issues/16257</ref>, one needs to build using Jiigen's fork:
 
For qBittorrent, until the I2P support is added<ref>https://github.com/qbittorrent/qBittorrent/issues/16257</ref>, one needs to build using Jiigen's fork:
   

Revision as of 22:51, 26 January 2023

libtorrent-rasterbar is a bittorrent library written in C++. It is used by popular clients, such as qBittorrent (QT) and Deluge (Python).

I2P Support

The I2P support is available through the SAM bridge in libtorrent. It was broken until late 2022 after a thread on zzz.i2p[1] with several patches being merged upstream[2][3].

Issues

Currently (early 2023), the peer count shows the right numbers, but the peer list (both in libtorrent's client_test and qBittorrent) shows only one peer of "IP: 0.0.0.0:0".

Examples

libtorrent

For libtorrent's client_test program (available with source, a basic full impl. of libtorrent), the following command can be used to leech/seed a magnet (this example shows I2P+'s 2.1.0 Windows installer) through I2P (by Vort):

examples/client_test --enable_dht=false --proxy_type=i2p_proxy --i2p_hostname=127.0.0.1 --i2p_port=7656 'magnet:?xt=urn:btih:889401025a1c16bbf9d8001ae157679507a87feb&dn=I2P%2B+Universal+Installer+2.1.0%2B&tr=http://tracker2.postman.i2p/announce.php'

You can press 'h' within client_test to see the available options.

qBittorrent

For qBittorrent, until the I2P support is added[4], one needs to build using Jiigen's fork:

git clone https://github.com/jiigen/qbittorrent -b i2p-support jiigen_qbit
cd jiigen_qbit
mkdir build
cd build
cmake ..
make
sudo make install

And within the Settings->Connection->Proxy, one needs to set "Proxy Type" to I2P, the host/port to SAM bridge's host/port, and needs to tick "proxy for peer connections/host lookups".

(Note: One might also want to enable Anonymous Mode. (Settings->BitTorrent->Enable anon.mode))

References

External links