# BitTorrent

**BitTorrent** 是由[布拉姆·科恩](https://www.edgepedia.org/zh/bram-cohen)（Bram Cohen）创建的点对点文件分发协议，一组对等节点同时下载和上传同一个文件，因此下载者也能把自己已经拥有的分片提供给其他人<sup>[1](https://link.springer.com/article/10.1007/s13173-013-0112-z)</sup><sup> • </sup><sup>[2](https://www.theverge.com/tech/959848/bittorrent-story-25-years-piracy)</sup>。科恩于2004年与阿什温·纳文（Ashwin Navin）共同创立BitTorrent公司（BitTorrent Inc.）以将该技术商业化，2018年6月，该公司以1.4亿美元现金出售给[孙宇晨](https://www.edgepedia.org/zh/justin-sun)（Justin Sun）的区块链初创公司波场（Tron）<sup>[3](https://techcrunch.com/2018/06/18/bittorrent-tron/)</sup>。

| 关键事实 | 详情 |
|---|---|
| 创建者与公司 | 协议由布拉姆·科恩设计；BitTorrent公司由科恩与阿什温·纳文于2004年创立；2018年以1.4亿美元出售给波场<sup>[3](https://techcrunch.com/2018/06/18/bittorrent-tron/)</sup> |
| 核心激励机制 | 每个对等节点解除对固定数量对等节点（默认四个）的阻塞，按下载速率选择，每十秒重新计算一次，乐观解除阻塞计入该数量<sup>[4](https://www.bittorrent.org/beps/bep_0003.html)</sup> |
| 分片选择 | 本地最稀有优先：每个节点下载其邻居中副本最少的数据块，有助于缓解最后一块问题<sup>[5](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/infocom06.pdf)</sup> |
| 无追踪器运行 | 基于Kademlia的UDP“分布式松散哈希表”让每个对等节点都能充当追踪器<sup>[6](https://bittorrent.org/beps/bep_0005.html)</sup> |
| 流量占比 | 2004年约占全部互联网流量的35%；2019年占上行流量的27.58%；2024年占固定接入上行流量的4%<sup>[7](https://torrentfreak.com/bittorrent-is-no-longer-the-king-of-upstream-internet-traffic-240315/)</sup><sup> • </sup><sup>[8](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/Internet%20Phenomena/Internet%20Phenomena%20Report%20Q32019%2020190910.pdf)</sup> |
| 版本2 | BEP 52以按文件构建的SHA-256 Merkle树和新的文件树布局取代SHA-1<sup>[9](https://www.xda-developers.com/the-story-of-bram-cohen-and-the-bittorrent-protocol/)</sup> |
| 法律地位 | 唯一未被好莱坞或各大唱片公司起诉的大型文件共享软件发行商<sup>[2](https://www.theverge.com/tech/959848/bittorrent-story-25-years-piracy)</sup> |

## 协议如何运作

分发始于元信息文件。.torrent文件包含文件信息、长度、名称和哈希信息，并在适用时包含追踪器的URL；追踪器通过HTTP使用简单协议帮助下载者相互发现<sup>[10](https://bittorrent.org/bittorrentecon.pdf)</sup>。.torrent文件携带分片大小、每个分片的SHA-1哈希值以及追踪器地址，而追踪器这一集中式组件并不参与文件的实际分发，只跟踪对等节点并收集统计数据<sup>[11](https://ar5iv.labs.arxiv.org/html/cs/0609026)</sup>。元信息文件是bencode编码的字典<sup>[4](https://www.bittorrent.org/beps/bep_0003.html)</sup>。

**磁力链接**减少甚至消除了分发.torrent文件的需要：磁力链接可以利用DHT找到提供元信息的对等节点，而DHT提供了去中心化的方式来定位共享数据的对等节点<sup>[9](https://www.xda-developers.com/the-story-of-bram-cohen-and-the-bittorrent-protocol/)</sup>。

一旦连接建立，对等节点便通过对等节点线协议交换数据，这是BitTorrent文件传输的主要通信层；大多数协议扩展使用BEP 10，以便在客户端之间协商<sup>[12](https://github.com/webtorrent/bittorrent-protocol/)</sup>。如果过去28秒内未发送任何消息，对等节点会发送一条零长度的保活消息，以保持打洞路由开放并更早检测到断开的连接<sup>[13](https://tixati.com/specs/bittorrent/peer_connections)</sup>。

分片选择遵循本地最稀有优先策略：节点尝试下载其邻居中副本最少的数据块。该策略对于消除“最后一块”问题、确保新的下载者能迅速有东西提供给其他节点至关重要<sup>[5](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/infocom06.pdf)</sup>。最稀有优先促进高分片多样性，并能减少稀有分片的重新出现；最后分片减速已在瞬态种子状态下观察到，但在稳态下未观察到<sup>[11](https://ar5iv.labs.arxiv.org/html/cs/0609026)</sup>。

## 激励机制与群体动态

BitTorrent不做集中式资源分配。每个对等节点负责最大化自己的下载速率，从任何可能的来源下载，并通过一报还一报的变体决定向哪些对等节点上传<sup>[10](https://bittorrent.org/bittorrentecon.pdf)</sup>。

**阻塞算法**如下运作。阻塞是一种通知，表示在解除阻塞之前不会发送数据<sup>[4](https://www.bittorrent.org/beps/bep_0003.html)</sup>。已部署的算法每十秒才改变一次被阻塞的对象，以避免颤动，并通过解除对固定数量感兴趣对等节点（默认四个）的阻塞来实现互惠和上传上限，乐观解除阻塞计入该数量<sup>[4](https://www.bittorrent.org/beps/bep_0003.html)</sup>。上传速率更好但不感兴趣的对等节点会被解除阻塞，如果它们变得感兴趣，则上传最差者被阻塞；拥有完整文件的对等节点使用其上传速率而非下载速率来决定解除谁的阻塞<sup>[4](https://www.bittorrent.org/beps/bep_0003.html)</sup>。对于乐观解除阻塞，单个对等节点不论其上传速率如何都会被解除阻塞，计入四个允许的下载者之一<sup>[4](https://www.bittorrent.org/beps/bep_0003.html)</sup>。研究测量表明乐观解除阻塞通常每30秒一次，并发上传限制在很小的数量，通常为5<sup>[5](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/infocom06.pdf)</sup>；原始实现使用20秒滚动平均下载速率<sup>[10](https://bittorrent.org/bittorrentecon.pdf)</sup>。

这一设计使搭便车在通常情况下无利可图：节点优先向为其提供最佳下载速率的邻居上传，因此不上传任何东西的对等节点只能竞争唯一的乐观名额<sup>[5](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/infocom06.pdf)</sup>。对该算法的分析表明，它促进相似带宽对等节点形成集群，奖励贡献数据的对等节点，并保持高上传利用率<sup>[14](https://ar5iv.labs.arxiv.org/html/cs/0703107)</sup>，最新版本的阻塞算法被描述为公平、促进互惠且对搭便车者具有鲁棒性<sup>[11](https://ar5iv.labs.arxiv.org/html/cs/0609026)</sup>。

这种保护并不完整。对等节点可以通过从种子获取数据、广泛了解该文件共享群体中的其他参与者或被授予许多乐观解除阻塞来提高其下载速度。<sup>[14](https://ar5iv.labs.arxiv.org/html/cs/0703107)</sup> 激励机制本身可能诱发搭便车：下载速率高于另一对等节点当前顶级链接之一的节点，可以使新发现的链接保留在该对等节点的解除阻塞列表中<sup>[15](https://dl.acm.org/doi/pdf/10.1145/1080192.1080199)</sup>。一项博弈论分析认为，BitTorrent实际上并未使用一报还一报，基于拍卖的模型更为贴合，解除阻塞名额数量通常是小常数（4）或上传带宽的函数<sup>[16](http://ccr.sigcomm.org/online/files/p243-levin.pdf)</sup>。基于速率的一报还一报也无法防止所提供内容量方面的不公平，主要发生在高带宽对等节点连接低带宽对等节点时<sup>[5](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/infocom06.pdf)</sup>。

**种子与吸血者。** 要使文件可用，必须启动一个已拥有完整文件的下载者，称为种子；追踪器和Web服务器的带宽需求很低，而种子必须发送数据<sup>[10](https://bittorrent.org/bittorrentecon.pdf)</sup>。如果种子无法提供足够的上传容量，无论每个对等节点上传多少，下载往往会在几乎同一时刻完成，而带宽更大的对等节点帮助种子服务带宽较小的对等节点。<sup>[14](https://ar5iv.labs.arxiv.org/html/cs/0703107)</sup>

## 协议扩展与变体

**DHT。** BitTorrent使用“分布式松散哈希表”为无追踪器种子存储对等节点联系信息；实际上每个对等节点都成为追踪器。该协议基于Kademlia，通过UDP实现<sup>[6](https://bittorrent.org/beps/bep_0005.html)</sup>。结合对等节点信息交换，这使得群体在追踪器消失后仍能继续：客户端一旦找到对等节点，就能在追踪器丢失后存活，DHT提供无追踪器运行，使系统更加鲁棒<sup>[17](https://daniel.haxx.se/docs/bittorrent-vs-http.html)</sup>。

**加密。** BitTorrent提供消息流加密（MSE），被描述为通过应用相当简单的密码技术实现的消息流混淆，而非像SSL那样的完整传输层安全机制<sup>[17](https://daniel.haxx.se/docs/bittorrent-vs-http.html)</sup>。

**版本2。** 根据BEP 52即BitTorrent v2规范，每个文件拥有基于SHA-256构建的自己的Merkle树，文件树被重构；信息哈希现在通过用SHA-256对bencode编码的信息字典进行哈希得出，追踪器和握手经常将其缩短为20字节<sup>[9](https://www.xda-developers.com/the-story-of-bram-cohen-and-the-bittorrent-protocol/)</sup>。v2规范保留了与BEP 3相同的阻塞算法文本，因此互惠策略原封不动地延续下来<sup>[18](https://www.bittorrent.org/beps/bep_0052.html)</sup>。2023年后的“协议版本3”规范定义了哈希说明符，如SHA3-256-18，即32字节SHA3-256哈希，其最终输出必须以18个零位开头，以及SHA2-256-23，以23个零位开头<sup>[19](https://tixati.com/specs/bittorrent/v3)</sup>。

## 数据一览

BitTorrent在互联网流量中的份额从2000年代中期的峰值稳步下降。2004年，研究表明BitTorrent约占全部互联网流量的35%；2013年它仍占全部上传流量的大约三分之一，随后持续下降，到2024年的两年前降至10%的低点<sup>[7](https://torrentfreak.com/bittorrent-is-no-longer-the-king-of-upstream-internet-traffic-240315/)</sup>。在2019年第三季度Sandvine报告期内，仅BitTorrent就占全球下行流量的2.46%和上行流量的27.58%，文件共享在所有地区都在增长<sup>[8](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/Internet%20Phenomena/Internet%20Phenomena%20Report%20Q32019%2020190910.pdf)</sup>。

根据2024年3月的Sandvine报告，BitTorrent占固定接入网络上行带宽的4%，不再出现在移动端前十名中，已被云存储、FaceTime、Google和YouTube超越；Sandvine提到每用户平均46 MB的BitTorrent上行流量，集中在一小部分用户中<sup>[7](https://torrentfreak.com/bittorrent-is-no-longer-the-king-of-upstream-internet-traffic-240315/)</sup>。从地区来看，BitTorrent在美洲产生第三大的上行流量，在欧洲小得多，在亚太地区的前十上行排名中不出现<sup>[20](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/2024/GIPR/GIPR%202024.pdf)</sup>。Sandvine将下降归因于人们使用云和流媒体服务<sup>[20](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/2024/GIPR/GIPR%202024.pdf)</sup>。VPN的使用意味着部分种子流量无法准确测量，但VPN不出现在上传排行榜中，因此总体结论仍然成立<sup>[7](https://torrentfreak.com/bittorrent-is-no-longer-the-king-of-upstream-internet-traffic-240315/)</sup>。

另外两个数字勾勒了这一趋势。在2018年出售时，BitTorrent声称其产品约有1.7亿用户，其协议在典型日子里承载了全球互联网流量的40%之多，这一公司声明远高于独立测量<sup>[3](https://techcrunch.com/2018/06/18/bittorrent-tron/)</sup>。在一项覆盖169个国家3150个网络上50万用户的研究中，BitTorrent总流量在一年内增长了12%；这一增长来自每个对等节点每小时下载量上升25%，尽管在线对等节点的典型数量下降了10%。<sup>[21](https://dl.acm.org/doi/10.1145/2043164.2018450)</sup>

## 与其他方案的比较

与直接HTTP或CDN下载相比，结构性差异在于韧性。BitTorrent客户端在找到对等节点后能在主服务器（追踪器）消失后存活，而HTTP方案依赖服务器保持运行；DHT和Mainline DHT增加了无追踪器运行，且BitTorrent能容忍个别停滞的连接，因为其他对等节点连接仍在继续<sup>[17](https://daniel.haxx.se/docs/bittorrent-vs-http.html)</sup>。网络影响也不同：对于超过一半的BitTorrent用户，大部分流量从未到达大型中转网络，而是由小型中转ISP承载，这在95百分位突发计费模式下对ISP计费有影响<sup>[21](https://dl.acm.org/doi/10.1145/2043164.2018450)</sup>。

与IPFS相比，IPFS文档将BitTorrent认定为使用TCP/IP、种子文件标识符和SHA-1哈希的P2P文件共享系统，并将其与IPFS的相似度评为低；IPFS是通用文件系统，使用DHT路由和传输内容寻址数据<sup>[22](https://docs.ipfs.tech/concepts/comparisons/)</sup>。

## 合法与商业用途

根据Sandvine，BitTorrent往往受到技术娴熟的重度互联网用户青睐——例如学者和科学家——他们也倾向于依赖VPN来保证文件安全<sup>[20](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/2024/GIPR/GIPR%202024.pdf)</sup>。在商业方面，科恩于2004年创立BitTorrent公司以将协议转化为业务<sup>[2](https://www.theverge.com/tech/959848/bittorrent-story-25-years-piracy)</sup>，该公司现由波场拥有，声称其客户端仍有5400万月活用户<sup>[2](https://www.theverge.com/tech/959848/bittorrent-story-25-years-piracy)</sup>。

## 法律与安全维度

该协议的去中心化设计塑造了其法律历史。科恩构建应用时没有搜索功能，依赖第三方网站进行内容发现，也没有运行集中式服务器来帮助用户找到其他客户端；时至今日，BitTorrent仍是唯一未被好莱坞和各大唱片公司起诉的大型文件共享软件发行商<sup>[2](https://www.theverge.com/tech/959848/bittorrent-story-25-years-piracy)</sup>。在用户方面，同一份Sandvine报告指出，重度学术和科学用户倾向于使用VPN来保护其大量文件传输<sup>[20](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/2024/GIPR/GIPR%202024.pdf)</sup>。

## References

1. [BitTorrent traffic from a caching perspective, Springer](https://link.springer.com/article/10.1007/s13173-013-0112-z)
2. [BitTorrent's disastrous, legendary, and controversial story, The Verge](https://www.theverge.com/tech/959848/bittorrent-story-25-years-piracy)
3. [BitTorrent is selling for $140M to Justin Sun and his blockchain startup Tron, TechCrunch (2018)](https://techcrunch.com/2018/06/18/bittorrent-tron/)
4. [The BitTorrent Protocol Specification (BEP 3)](https://www.bittorrent.org/beps/bep_0003.html)
5. [Analyzing and Improving a BitTorrent Network's Performance Mechanisms, INFOCOM 2006](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/infocom06.pdf)
6. [BEP 5: DHT Protocol](https://bittorrent.org/beps/bep_0005.html)
7. [BitTorrent is No Longer the 'King' of Upstream Internet Traffic, TorrentFreak (2024)](https://torrentfreak.com/bittorrent-is-no-longer-the-king-of-upstream-internet-traffic-240315/)
8. [Sandvine Internet Phenomena Report Q3 2019](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/Internet%20Phenomena/Internet%20Phenomena%20Report%20Q32019%2020190910.pdf)
9. [The story of Bram Cohen and the BitTorrent protocol, XDA](https://www.xda-developers.com/the-story-of-bram-cohen-and-the-bittorrent-protocol/)
10. [Incentives Build Robustness in BitTorrent (Bram Cohen, 2003)](https://bittorrent.org/bittorrentecon.pdf)
11. [Rarest First and Choke Algorithms Are Enough, arXiv](https://ar5iv.labs.arxiv.org/html/cs/0609026)
12. [webtorrent/bittorrent-protocol, GitHub](https://github.com/webtorrent/bittorrent-protocol/)
13. [BitTorrent Peer Connections Specification, Tixati](https://tixati.com/specs/bittorrent/peer_connections)
14. [Clustering and Sharing Incentives in BitTorrent Systems, arXiv](https://ar5iv.labs.arxiv.org/html/cs/0703107)
15. [Incentives in BitTorrent Induce Free Riding, SIGCOMM 2005 P2PEcon](https://dl.acm.org/doi/pdf/10.1145/1080192.1080199)
16. [BitTorrent is an Auction: Analyzing and Improving BitTorrent's Incentives, SIGCOMM CCR](http://ccr.sigcomm.org/online/files/p243-levin.pdf)
17. [bittorrent vs HTTP (Daniel Stenberg)](https://daniel.haxx.se/docs/bittorrent-vs-http.html)
18. [The BitTorrent Protocol Specification v2 (BEP 52)](https://www.bittorrent.org/beps/bep_0052.html)
19. [BitTorrent Protocol Version 3 Specification, Tixati](https://tixati.com/specs/bittorrent/v3)
20. [Sandvine 2024 Global Internet Phenomena Report](https://www.sandvine.com/hubfs/Sandvine_Redesign_2019/Downloads/2024/GIPR/GIPR%202024.pdf)
21. [On blind mice and the elephant: understanding the network impact of a large distributed system, SIGCOMM 2011](https://dl.acm.org/doi/10.1145/2043164.2018450)
22. [IPFS comparisons, IPFS Docs](https://docs.ipfs.tech/concepts/comparisons/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Internet protocol suite

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/bittorrent

English original: https://www.edgepedia.org/bittorrent
