Torrent DHT udp

99封情书 提交于 2020-01-01 08:51:15

问题


Im trying to get access to a Torrent DHT network, and im having a hard time figuring out howto get access to the "entry" node in DHT.

How does a DHT in a Bittorent client get "bootstrapped"?

Describes that a couple of standard entry nodes could be used router.bittorrent.com and router.utorrent.com running on port 6881 (UDP). AND http://www.bittorrent.org/beps/bep_0005.html describes the protocol on howto interact with a DHT server.

But if i send a simple UDP message to router.utorrent.com:6881, how do i know which port messages will be sent back to me in response to my requests? i tried listening for messages on the same port as i send to 6881 but i receive nothing.

Is these entry points limited to their own client (uTorrent) or can any thirdparty client use their "router"?


回答1:


DHT responses are always sent to the same port the query was sent from.

If you're not getting a response from router.utorrent.com, it could be because it's temporarily down or because its network interface is saturated (last time I checked it was handling 6000 requests per second, iirc). If you only sent a single message, it could have been lost in the network as well.

Another reason for the DHT router not to respond would be if your query is mal-formed. I would suggest running wireshark, comparing uTorrent's DHT messages with your own, side-by-side.

uTorrent's DHT router is not locked in to any specific client, anyone can use it for bootstrapping.

As an alternative way to bootstrap, you could download some popular .torrent files, announce to the tracker and bootstrap off of the peers.



来源:https://stackoverflow.com/questions/6899112/torrent-dht-udp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!