BencodeNET icon indicating copy to clipboard operation
BencodeNET copied to clipboard

Is it possible to add BitTorrent v2 support?

Open vicenteyu opened this issue 2 years ago • 2 comments

vicenteyu avatar Jan 29 '24 07:01 vicenteyu

FWIW, I think that BitTorrent v2 is vaporwave at the moment given that Transmission doesn't support it (and doesn't plan to support it anytime soon). In practice the lack of support for it should not be a problem for the time being.

somegenericdev avatar Apr 21 '25 07:04 somegenericdev

FWIW its pretty easy (just kind of a hassle) to use BencodeParser instead of TorrentParser to parse torrent files and grab the values you need yourself. You can easily detect if a torrent is V1/V2/Hybrid by checking for info.pieces which is only in V1 and info.file tree which is only in V2. If both exist you got a hybrid torrent. You can then use SHA1 and SHA256 to generate the V1 and V2 infohashes. If you want the validity check that TorrentParserMode.Strict does, you can rip EnsureValidTorrentData(...) from TorrentParser.cs#L138 but you'd need to extend it to check V2 fields of course.

AaronBeier avatar May 11 '25 20:05 AaronBeier