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

inh*_*dle 7 c bittorrent

我正在尝试在C中实现Bittorent.首先,在编写代码片段之前,我尝试使用Web浏览器将以下消息(URL)发送到跟踪器服务器.

你可以尝试这个URL.

http://torrent.ubuntu.com:6969/announce?
info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0
&peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0
&uploaded=0
&left=0
&event=started
Run Code Online (Sandbox Code Playgroud)

我已经从这个链接下载了torrent文件,文件名为dapper-dvd-i386.iso,并且具有9bdbbb49f085a2d15d96acfabff8310600314fe0SHA-1值.

但是,在发送上述请求后,我得到了

your client is outdated, please upgrade
(HTTP 400 bad request)
Run Code Online (Sandbox Code Playgroud)

为什么跟踪服务器不理解我的需求?互联网的任何规格都无济于事.
任何帮助都是极好的.先感谢您.

Enc*_*mbe 12

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

请参阅BEP 23:跟踪器返回紧凑对等列表http://www.bittorrent.org/beps/bep_0023.html

尝试:

http://torrent.ubuntu.com:6969/announce?
info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0
&peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0
&uploaded=0
&left=0
&event=started
&compact=1
Run Code Online (Sandbox Code Playgroud)

http://torrent.ubuntu.com:6969/announce?info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0&peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0&uploaded=0&left=0&event=started&compact=1
Run Code Online (Sandbox Code Playgroud)

并且跟踪器的答案是:

d8:completei4e10:incompletei0e8:intervali1800e5:peers6:******e
Run Code Online (Sandbox Code Playgroud)