Bittorrent tracker request, format of info_hash

后端 未结 2 930
醉酒成梦
醉酒成梦 2021-01-18 00:32

When I want to send an initial request to a tracker all references I\'ve seen says it needs to be url-encoded. If I transform the SHA-1 hash I have of the info key into a he

相关标签:
2条回答
  • 2021-01-18 00:54

    The info_hash parameter is not a hex string. It's a pure binary string, so yes, you will have to URL-encode many of the bytes in it. (This tends to make it longer in the end than just using a hex-encoded string, but that's the BitTorrent protocol for you, too late to do anything about it now!)

    0 讨论(0)
  • 2021-01-18 01:03

    Binary form of info-hash (a 20 byte long SHA1) should be URL encoded. AFAIK some trackers accept pure hexadecimal info-hash (40 character long string).

    0 讨论(0)
提交回复
热议问题