Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Feature request: BitTorrent v2 magnet links #146

Open
andrasfuchs opened this issue Oct 25, 2021 · 2 comments
Open

Feature request: BitTorrent v2 magnet links #146

andrasfuchs opened this issue Oct 25, 2021 · 2 comments

Comments

@andrasfuchs
Copy link

There is a fairly recent new BitTorrent standard, the BitTorrent v2.

It has a new, SHA-256 based magnet link format:
The magnet link protocol has been extended to support v2 torrents. Like the urn:btih: prefix for v1 SHA-1 info-hashes, there’s a new prefix, urn:btmh: for full v2 SHA0256 info hashes. For example, a magnet link thus looks like this:

magnet:?xt=urn:btmh:<tagged-info-hash>&dn=<name>&tr=<tracker-url>

The info-hash with the btmh prefix is the v2 info-hash in multi-hash format encoded in hexadecimal. In practice, this means it will have a two byte prefix of 0x12 0x20. It is possible to include both a v1 (btih) and v2 (btmh) info-hash in a magnet link, for backwards compatibility.

For example the following is a valid v2 magnet link:
magnet:?xt=urn:btmh:122067EFB3C2FA20CC493979084FB44C6A93F79442AFA4A2E01C8988C1C19775871D

If I try to parse this into Simple Torrent I get the following error message:
image

It would be great to support this new format.

@boypt
Copy link
Owner

boypt commented Oct 25, 2021

This needs upstream support, I found that they already discussed this few years ago and I believe it's not priority.

You may subscribe their issue , as long as they got supported.

anacrolix/torrent#175

@anacrolix
Copy link

@andrasfuchs where are you seeing v2 metainfos/BitTorrent in use?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants