uTorrent 如何在 TCP 和 uTP 之间进行选择?

How does uTorrent choose between TCP and uTP?

我正在尝试分析 uTorrent 如何使用 Wireshark 捕获发送的数据包。 同一本地网络中有三台主机,其中一台创建 torrent 并开始播种,而另外两台下载 torrent。从跟踪来看,uTorrent 似乎同时使用 TCP 和 uTP,有时会在下载过程中切换协议。 uTorrent 如何选择?我检查了 bittorrent 文档,但一无所获。有没有办法强制 uTorrent 只使用两者之一?

据我观察,uTorrent 似乎更喜欢 uTP 而不是 TCP,这通常是一个不错的选择。

Preferences > BitTorrent: 启用带宽管理[uTP]可用于开启uTP on/off。

可以在首选项>高级中进行更精确的控制: bt.transp_disposition
默认值:31

来自 µTorrent 用户手册:(按 F1

bt.transp_disposition: This option controls µTorrent's level of bias towards using TCP or uTP for transporting data (assuming the peer at the other end of the connection supports both transport protocols). The following is a list of the accepted values:

  • 1 allows µTorrent to attempt outgoing TCP connections
  • 2 allows µTorrent to attempt outgoing uTP connections
  • 4 allows µTorrent to accept incoming TCP connections
  • 8 allows µTorrent to accept incoming uTP connections
  • 16 tells µTorrent to use the new uTP header. This is an improved communication header, but is not backwards compatible with clients that do not understand it.

This option is interpreted as a bitfield, so values can be added together to obtain a combination of behaviors. Setting this value to 255 guarantees that all behaviors are enabled.