What are the most recent bittorrent DHT implementation recommendations?

前端 未结 1 1942
死守一世寂寞
死守一世寂寞 2021-01-16 18:05

I\'m working on implementing yet another bittorrent client and at this time struggling with DHT. It is implemented accordingly to this specification http://www.bittorrent.or

相关标签:
1条回答
  • 2021-01-16 18:18

    the spec says (emphasis mine):

    When a node receives a find_node query, it should respond with a key "nodes" and value of a string containing the compact node info for [...]

    Further down:

    Contact information for nodes is encoded as a 26-byte string. Also known as "Compact node info" the 20-byte Node ID in network byte order has the compact IP-address/port info concatenated to the end.


    Additionally you should read the original Kademlia paper since the bittorrent BEP builds on the concepts described therein and omits deeper explanations of those concepts.

    You might also want to read for a few few extensions that are more or less de-facto standard for most implementations now http://libtorrent.org/dht_extensions.html

    And read the other DHT-related BEPs, some are fairly widely adopted and modify/clarify BEP-5-specified behavior, but generally in a backward-compatible way.


    For example, find_node is supposed to return either target node info or 8 closest nodes

    Nodes will return a variable amount of entries. Could be more than 8. Or fewer.

    0 讨论(0)
提交回复
热议问题