向 Ubuntu 跟踪器发送 Bittorrent HTTP 请求

Sta*_*lfi 3 bittorrent http http-get

我从这里下载了 ubuntu 17.10 的 torrent 文件:https : //www.ubuntu.com/download/alternative-downloads

这是里面的内容:

TorrentInfo{Created By: null
Main tracker: http://torrent.ubuntu.com:6969/announce
Comment: Ubuntu CD releases.ubuntu.com
Info_hash: f07e0b0584745b7bcb35e98097488d34e68623d0
Name: ubuntu-17.10.1-desktop-amd64.iso
Piece Length: 524288
Pieces: 2866
Total Size: 1502576640
Is Single File Torrent: true
File List: 
Tracker List: 
http://torrent.ubuntu.com:6969/announce
http://ipv6.torrent.ubuntu.com:6969/announce
Run Code Online (Sandbox Code Playgroud)

我尝试过的:

我发送:(仅洪流信息哈希)

http://torrent.ubuntu.com:6969/announce?info_hash=%f0%7e%0b%05%84%74%5b%7b%cb%35%e9%80%97%48%8d%34%e6 %86%23%d0

并收到:

你寄给我垃圾 - id 不是 20

我发送了:(种子信息哈希和我的对等 ID)

http://torrent.ubuntu.com:6969/announce?info_hash=%f0%7e%0b%05%84%74%5b%7b%cb%35%e9%80%97%48%8d%34%e6 %86%23%d0&peer_id=%2D%41%5A%35%37%35%30%2D%54%70%6B%58%74%74%5A%4C%66%70%53%48

并收到:

你给我发了垃圾 - 基数为 10 的 long() 无效文字:''


我错过了什么?该规范没有指定任何示例。

规格:

https://wiki.theory.org/index.php/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol

Enc*_*mbe 5

公布未命中强制性键端口上传下载离开
这些键加上info_hashpeer_id,必须在每个announce 中

此外,虽然事件键在每个announce 中不是必须的,
但第一个给跟踪器的announce必须包含' event=started '。

试:

http://torrent.ubuntu.com:6969/announce?info_hash=%f0%7e%0b%05%84%74%5b%7b%cb%35%e9%80%97%48%8d%34%e6 %86%23%d0&peer_id=%2D%41%5A%35%37%35%30%2D%54%70%6B%58%74%74%5A%4C%66%70%53%48&port=6881&上传= 0&downloaded=0&left=1502576640&event=started

和跟踪器响应:

您的客户端已过时,请升级

哦,还有更多要解决的...

来自我的回答:为什么跟踪服务器不理解我的请求?(Bittorrent 协议)

这是因为请求字符串中没有compact=1
现在大多数跟踪器都要求这样做。传统方式太无效了。

因此,将compact=1添加 到announce 中

http://torrent.ubuntu.com:6969/announce?info_hash=%f0%7e%0b%05%84%74%5b%7b%cb%35%e9%80%97%48%8d%34%e6 %86%23%d0&peer_id=%2D%41%5A%35%37%35%30%2D%54%70%6B%58%74%74%5A%4C%66%70%53%48&port=6881&上传= 0&downloaded=0&left=1502576640&event=started&compact=1

和跟踪器响应:

d8:completei2134e10:incompletei100e8:intervali1800e5:peers300:[二进制数据...]e

成功!