奇怪的“peers”字段来自种子公告。

huangapple go评论87阅读模式
英文:

Odd "peers" field from torrent announce

问题

作为一个有趣的副项目,我正在尝试用Golang编写一个BitTorrent客户端。我目前的测试跟踪器是Ubuntu 20.04.5 iso文件,可以在这里找到。我已经能够达到向跟踪器发出请求的阶段,看起来注册正确,但是我得到了以下返回的bencoded字符串:

d8:completei193e10:incompletei4e8:intervali1800e5:peers6:};e

我的主要问题是我无法弄清楚如何解释这里返回的peers字段,以便开始向对等方发出请求。我是否遗漏了什么?感谢您能提供的任何帮助!

英文:

As a fun side-project, I'm trying to write a Bittorrent client in Golang. My test tracker right now is the Ubuntu 20.04.5 iso file found here. I'm able to get to the point where I'm making a request to the tracker that seems to be registered correctly, but I'm getting the following bencoded string returned to me:

d8:completei193e10:incompletei4e8:intervali1800e5:peers6:};e

My big problem is that I can't figure out how to interpret the peers field returned here in order to begin making requests to peers. Is there something I'm missing? Thanks for any help you can provide!

答案1

得分: 0

这是一个紧凑的节点列表(BEP 23BEP 07适用于IPv6)。这应该是一个通过额外的请求参数来选择的扩展功能,但有些跟踪器无条件地发送该响应类型。

英文:

That's a compact peers list (BEP 23, and BEP 07 for IPv6). That should be an opt-in extension signalled through an additional request parameter, but some trackers send that response type unconditionally.

huangapple
  • 本文由 发表于 2022年10月23日 05:40:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/74167287.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定