Problems with converting non-I2P torrent to I2P torrent #15057

Open
opened 2026-02-22 01:43:30 -05:00 by deekerman · 7 comments
Owner

Originally created by @Vort on GitHub (Oct 23, 2023).

qBittorrent & operating system versions

qBittorrent: 4.6.0 x64
Operating system: Windows 7 SP1 x64 6.1.7601
Qt: 5.15.8
libtorrent-rasterbar: 2.0.9.0

What is the problem?

Sometimes user may want to obtain non-I2P (clearnet) torrent and convert it to I2P torrent.
Currently it means removing clearnet trackers and adding I2P tracker.
The problem is that despite having only I2P tracker, qBittorrent continues to treat it as clearnet torrent and connects to clearnet peers.

Steps to reproduce

  1. Start I2P software and enable I2P mode in qBittorrent (without mixed mode).
  2. Unpack torrent file i2pupdate-2.2.0.su3.zip, load it into qBittorrent, uncheck "Start torrent" and press OK.
  3. Remove trackers udp://tracker.openbittorrent.com:80, udp://tracker.opentrackr.org:1337/announce and add tracker http://tracker2.postman.i2p/announce.php.
  4. Start torrent.

qBittorrent should not connect to clearnet peers, but it does.

Additional context

No response

Log(s) & preferences file(s)

No response

Originally created by @Vort on GitHub (Oct 23, 2023). ### qBittorrent & operating system versions qBittorrent: 4.6.0 x64 Operating system: Windows 7 SP1 x64 6.1.7601 Qt: 5.15.8 libtorrent-rasterbar: 2.0.9.0 ### What is the problem? Sometimes user may want to obtain non-I2P (clearnet) torrent and convert it to I2P torrent. Currently it means removing clearnet trackers and adding I2P tracker. The problem is that despite having only I2P tracker, qBittorrent continues to treat it as clearnet torrent and connects to clearnet peers. ### Steps to reproduce 1. Start I2P software and enable I2P mode in qBittorrent (without mixed mode). 2. Unpack torrent file [i2pupdate-2.2.0.su3.zip](https://github.com/qbittorrent/qBittorrent/files/13073990/i2pupdate-2.2.0.su3.zip), load it into qBittorrent, uncheck "Start torrent" and press OK. 3. Remove trackers `udp://tracker.openbittorrent.com:80`, `udp://tracker.opentrackr.org:1337/announce` and add tracker `http://tracker2.postman.i2p/announce.php`. 4. Start torrent. qBittorrent should not connect to clearnet peers, but it does. ### Additional context _No response_ ### Log(s) & preferences file(s) _No response_
Author
Owner

@Pat-JK commented on GitHub (Oct 24, 2023):

I've noticed that removing the trackers from a clearnet torrent doesn't always remove ALL of them. It may appear like it has in the trackers tab, but exporting the .torrent file and opening it in a tool like Torrent File Editor ends up showing clearnet trackers. Using said tool to remove all of the trackers and only adding i2p and saving the torrent will work.

@Pat-JK commented on GitHub (Oct 24, 2023): I've noticed that removing the trackers from a clearnet torrent doesn't always remove ALL of them. It may appear like it has in the trackers tab, but exporting the .torrent file and opening it in a tool like [Torrent File Editor](https://torrent-file-editor.github.io) ends up showing clearnet trackers. Using said tool to remove all of the trackers and only adding i2p and saving the torrent will work.
Author
Owner

@glassez commented on GitHub (Oct 24, 2023):

@Vort
I believe it is libtorrent responsibility.
Seems like libtorrent mark torrent as non-i2p once it is loaded and don't change this flag when trackers are changed.
I wonder what happens if you restart qBittorrent after you've changed trackers.

@glassez commented on GitHub (Oct 24, 2023): @Vort I believe it is `libtorrent` responsibility. Seems like `libtorrent` mark torrent as non-i2p once it is loaded and don't change this flag when trackers are changed. I wonder what happens if you restart qBittorrent after you've changed trackers.
Author
Owner

@Vort commented on GitHub (Oct 24, 2023):

I believe it is libtorrent responsibility.

If I remember correctly, libtorrent allows clients to change I2P status of torrent.
Not the best solution, but may be worth using.

I wonder what happens if you restart qBittorrent after you've changed trackers.

I2P status is detected correctly after client restart.

Another hack is to add torrents with manually edited magnet links.

By the way, http://tracker2.postman.i2p/announce.php is lagging for some reason, so here is another tracker for testing: http://opentracker.dg2.i2p/a.

@Vort commented on GitHub (Oct 24, 2023): > I believe it is libtorrent responsibility. If I remember correctly, libtorrent allows clients to change I2P status of torrent. Not the best solution, but may be worth using. > I wonder what happens if you restart qBittorrent after you've changed trackers. I2P status is detected correctly after client restart. Another hack is to add torrents with manually edited magnet links. By the way, `http://tracker2.postman.i2p/announce.php` is lagging for some reason, so here is another tracker for testing: `http://opentracker.dg2.i2p/a`.
Author
Owner

@glassez commented on GitHub (Oct 25, 2023):

@Vort
I mean that libtorrent shouldn't allow to put torrent to such an incorrect state.
If a torrent with only an i2p tracker(s) (it doesn't matter if it was originally or as a result of replacing trackers) and the disabled mixed mode should not connect to clearnet peers, then the fact that it does this is an obvious libtorrent bug, IMO.
@arvidn?

@glassez commented on GitHub (Oct 25, 2023): @Vort I mean that `libtorrent` shouldn't allow to put torrent to such an incorrect state. If a torrent with only an i2p tracker(s) (it doesn't matter if it was originally or as a result of replacing trackers) and the disabled mixed mode should not connect to clearnet peers, then the fact that it does this is an obvious `libtorrent` bug, IMO. @arvidn?
Author
Owner

@anikey-from-i2p commented on GitHub (Aug 6, 2024):

I've noticed that removing the trackers from a clearnet torrent doesn't always remove ALL of them. It may appear like it has in the trackers tab, but exporting the .torrent file and opening it in a tool like Torrent File Editor ends up showing clearnet trackers. Using said tool to remove all of the trackers and only adding i2p and saving the torrent will work.

I've also encountered this.

You can close qBT and open it back, before exporting. Then it will work. Should I file a separate bug report?

@anikey-from-i2p commented on GitHub (Aug 6, 2024): > I've noticed that removing the trackers from a clearnet torrent doesn't always remove ALL of them. It may appear like it has in the trackers tab, but exporting the .torrent file and opening it in a tool like [Torrent File Editor](https://torrent-file-editor.github.io) ends up showing clearnet trackers. Using said tool to remove all of the trackers and only adding i2p and saving the torrent will work. I've also encountered this. You can close qBT and open it back, before exporting. Then it will work. Should I file a separate bug report?
Author
Owner

@Neustradamus commented on GitHub (Jan 27, 2025):

@arvidn has done a recent PR about I2P:

@Neustradamus commented on GitHub (Jan 27, 2025): @arvidn has done a recent PR about I2P: - https://github.com/arvidn/libtorrent/pull/7831
Author
Owner

@xavier2k6 commented on GitHub (Mar 16, 2025):

Should I file a separate bug report?

Well, if it's not a duplicate of this or you can provide more context/submit a PR if possible - then go ahead but just make sure you are using latest qBittorrent 5.0.4.

@xavier2k6 commented on GitHub (Mar 16, 2025): >Should I file a separate bug report? Well, if it's not a duplicate of this or you can provide more context/submit a PR if possible - then go ahead but just make sure you are using latest qBittorrent 5.0.4.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#15057
No description provided.