为什么追踪服务器无法理解我的请求?(比特流协议)

8
我将尝试在C语言中实现比特流技术。在编写代码之前,我先尝试使用网络浏览器向追踪服务器发送以下信息(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

我从这个链接下载了一个名为dapper-dvd-i386.iso,SHA-1值为9bdbbb49f085a2d15d96acfabff8310600314fe0的种子文件。然而,在发送请求后,我收到了以下的反馈:
your client is outdated, please upgrade
(HTTP 400 bad request)

为什么跟踪服务器不能理解我的请求?互联网上的任何规范都无法帮助我。
希望能得到帮助,非常感谢您的支持。

请在您的请求中包含生成代码。 - jxh
1
当我尝试了C代码后,我得到了与Web浏览器相同的结果。您可以使用您的Web浏览器尝试上面的URL。 - inherithandle
@jxh 我觉得URL可能有问题,所以我想请人帮我纠正一下。 - inherithandle
1个回答

15
因为请求字符串中没有包含 compact=1,大多数现代追踪器都要求这样做。传统的方式太低效了。
请查看 BEP 23:Tracker Returns Compact Peer Lists 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

ie

:ie(Internet Explorer)是微软公司开发的一款浏览器,曾经是市场上最流行的浏览器之一。
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

跟踪器的答案是:

d8:completei4e10:incompletei0e8:intervali1800e5:peers6:******e

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接