英文:
How do I fetch the metadata of a torrent using an Infohash?
问题
我假设在使用该Infohash找到对等方之后,您会发送握手消息,直到一个对等方建立连接。但我似乎在Wireshark中找不到包含元数据的任何数据包。如果可能的话,您能展示一下元数据查询是什么样的吗?
关于元数据,我唯一找到的信息是bep 9,但我觉得有点难以理解,并且在Wireshark中也找不到类似的内容。
英文:
I am assuming that after finding peers using that Infohash you send handshake messages until one peer establishes a connection. But I can't seem to find any packet in Wireshark that has the metadata in it. If possible can you show me how a metadata query looks like?
The only thing I've found about metadata was bep 9 but it was kinda hard for me to understand and I didn't find anything in Wireshark similar
答案1
得分: 1
你已经找到了相关的BEP 9。要实现它,首先必须实现BEP 10,然后检查扩展标头,看对等方是否支持BEP 9,如果支持,则发送一系列带有适当协商的ID的扩展消息,携带元数据请求消息。
在大多数BitTorrent连接中,您应该能看到扩展握手消息,因为许多客户端都支持它。您不太可能看到元数据请求/数据消息(除非您在客户端中明确触发它们),因为这只是比下载种子有效负载更不常见的操作。
英文:
You already found the relevant BEP 9. To implement it you first have to implement BEP 10 and then check the extension header whether the peer supports BEP 9 and if it does send a series of extension messages with the appropriate negotiated IDs carrying a metadata request message.
You should be seeing the extension handshake message in most bittorrent connections since many clients support it. You're less likely to see metadata request/data messages (unless you explicitly trigger them in a client) because it's simply a less common operation than downloading the torrent payload.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论