Difference between revisions of "Libtorrent"
AGentooCat (talk | contribs) m (fix client_test showing only one peer) |
(qBittorrent: inform that i2p is supported) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {| class="wikitable zebra" |
||
⚫ | |||
+ | | In other languages: |
||
+ | | [[/Libtorrent-de|Deutsch]] |
||
+ | | [[/Libtorrent-fr|Français]] |
||
+ | |} |
||
+ | |||
+ | <!-- Vorbemerkung / (preface?) --> |
||
+ | ''Note: This page describes the BitTorrent library "libtorrent-rasterbar" by Rasterbar Software (Arvid Norberg) but not the similarly named BitTorrent library "LibTorrent" by Rakshasa.'' |
||
+ | |||
⚫ | |||
= I2P Support = |
= I2P Support = |
||
− | The I2P support is available through the [[en/docs/api/samv3| |
+ | The I2P support is available through the [[en/docs/api/samv3|SAMv3]] bridge in libtorrent. It was broken until late 2022 after a thread on zzz.i2p<ref>http://zzz.i2p/topics/3470-libtorrent-rasterbar-and-i2p</ref>, resulting in several patches being merged upstream<ref>https://github.com/arvidn/libtorrent/pull/7272</ref><ref>https://github.com/arvidn/libtorrent/commit/94ed94ec1468e786bea2610c59586c4bf2994697</ref>. |
== Issues == |
== Issues == |
||
− | Currently (early 2023), the peer count shows the right numbers, but the peer list (both in libtorrent's |
+ | Currently (early 2023), the peer count shows the right numbers, but the peer list (both in libtorrent's client_test<ref name="client_test">https://github.com/arvidn/libtorrent/blob/RC_2_0/examples/client_test.cpp - a basic full implementation of libtorrent</ref> and qBittorrent) shows only one peer with an IP address of "0.0.0.0:0".<br /> |
(client_test shows multiple 0.0.0.0's, while qBittorrent shows only one.) |
(client_test shows multiple 0.0.0.0's, while qBittorrent shows only one.) |
||
Line 13: | Line 22: | ||
== libtorrent == |
== libtorrent == |
||
− | For libtorrent's client_test |
+ | For libtorrent's client_test<ref name="client_test" /> program, the following command can be used to leech/seed a magnet<ref>This example uses I2P+'s 2.1.0 Universal Installer.</ref> 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> |
||
Line 20: | Line 29: | ||
== qBittorrent == |
== qBittorrent == |
||
− | For qBittorrent, |
+ | For qBittorrent, I2P support has been merged<ref>https://github.com/qbittorrent/qBittorrent/issues/16257</ref><ref>https://github.com/qbittorrent/qBittorrent/pull/18717</ref> with qBittorrent version 4.6 (although still considered experimental). It can now be turned on in Settings->Connection. Tunnel length and quantity can be tuned in Advanced->libtorrent Section. |
+ | |||
⚫ | |||
+ | |||
+ | === Before I2P support was merged === |
||
+ | |||
+ | Before that (until the I2P support is added), one needed to build using Jiigen's fork. |
||
+ | |||
+ | ''Make sure the installed libtorrent-rasterbar library includes the I2P-fix commit. Building/Installing from source is recommended until the release with the fix is tagged and becomes available on most distros<ref>https://github.com/arvidn/libtorrent/releases</ref>.'' |
||
<pre>git clone https://github.com/jiigen/qbittorrent -b i2p-support jiigen_qbit |
<pre>git clone https://github.com/jiigen/qbittorrent -b i2p-support jiigen_qbit |
||
Line 31: | Line 48: | ||
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". |
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". |
||
− | |||
⚫ | |||
= References = |
= References = |
||
Line 41: | Line 56: | ||
* https://github.com/arvidn/libtorrent - GitHub repository |
* https://github.com/arvidn/libtorrent - GitHub repository |
||
* https://github.com/qBittorrent/qbittorrent - qBittorrent's GitHub repository |
* https://github.com/qBittorrent/qbittorrent - qBittorrent's GitHub repository |
||
+ | |||
+ | [[Category:I2P]] |
||
+ | [[Category:BitTorrent]] |
||
+ | [[Category:BitTorrent-Client]] |
||
+ | <!-- might need to remove one of these --> |
Latest revision as of 23:10, 5 December 2023
In other languages: | Deutsch | Français |
Note: This page describes the BitTorrent library "libtorrent-rasterbar" by Rasterbar Software (Arvid Norberg) but not the similarly named BitTorrent library "LibTorrent" by Rakshasa.
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 SAMv3 bridge in libtorrent. It was broken until late 2022 after a thread on zzz.i2p[1], resulting in 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[4] and qBittorrent) shows only one peer with an IP address of "0.0.0.0:0".
(client_test shows multiple 0.0.0.0's, while qBittorrent shows only one.)
Examples
libtorrent
For libtorrent's client_test[4] program, the following command can be used to leech/seed a magnet[5] 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, I2P support has been merged[6][7] with qBittorrent version 4.6 (although still considered experimental). It can now be turned on in Settings->Connection. Tunnel length and quantity can be tuned in Advanced->libtorrent Section.
(Note: One might also want to enable Anonymous Mode. (Settings->BitTorrent->Enable anonymous mode))
Before I2P support was merged
Before that (until the I2P support is added), one needed to build using Jiigen's fork.
Make sure the installed libtorrent-rasterbar library includes the I2P-fix commit. Building/Installing from source is recommended until the release with the fix is tagged and becomes available on most distros[8].
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".
References
- ↑ http://zzz.i2p/topics/3470-libtorrent-rasterbar-and-i2p
- ↑ https://github.com/arvidn/libtorrent/pull/7272
- ↑ https://github.com/arvidn/libtorrent/commit/94ed94ec1468e786bea2610c59586c4bf2994697
- ↑ 4.0 4.1 https://github.com/arvidn/libtorrent/blob/RC_2_0/examples/client_test.cpp - a basic full implementation of libtorrent
- ↑ This example uses I2P+'s 2.1.0 Universal Installer.
- ↑ https://github.com/qbittorrent/qBittorrent/issues/16257
- ↑ https://github.com/qbittorrent/qBittorrent/pull/18717
- ↑ https://github.com/arvidn/libtorrent/releases
External links
- https://libtorrent.org - home page
- https://github.com/arvidn/libtorrent - GitHub repository
- https://github.com/qBittorrent/qbittorrent - qBittorrent's GitHub repository