rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
883 stars 210 forks source link

FR: ipv6 support for UDP trackers #235

Open edo1 opened 1 year ago

edo1 commented 1 year ago

Currently, ipv6 is only supported with HTTP trackers ("peers6" key).

https://www.bittorrent.org/beps/bep_0015.html IPv6 announces have the same structure as v4 ones, including the used action number except that the stride size of <IP address, TCP port> pairs in the response is 18 bytes instead of 6.

As far as I understand, the current code incorrectly interprets these 18 bytes as 3 pairs of <IPv4 address, TCP port>.