了解 Bittorrent 协议

问题描述 投票:0回答:4

我正在寻找一些书籍、教程网站。

我想了解 Bittorrent 协议的工作原理,然后实现我自己的跟踪器。

我对网络协议了解不多,所以我正在寻找新手。

看过以下帖子,但他们没有帮助我解决我的问题:

完全用 C# 编写的 BitTorrent 客户端?

实施 Bittorrent 协议

正在寻找一些了解 Bittorrent 的好书/资源吗?

感谢您的帮助。

networking p2p bittorrent
4个回答
17
投票

BitTorrent 规范非常容易阅读(相对而言):

http://www.bittorrent.org/beps/bep_0003.html

维基百科页面也非常全面:

http://en.wikipedia.org/wiki/BitTorrent_%28protocol%29


3
投票

BitTornado 有一个跟踪器实现,它是用 Python 编写的,易于阅读。最好从一些可行的东西开始,然后你可以尝试理解基于协议的代码。 BitTornado 基于 Bram Cohen 实现的原始版本。跟踪器在 BitTornado.BT1.track.py 中实现


2
投票

utube 上有很多视频,包括: 斯坦福研讨会 - Bram Cohen


0
投票

我编写了一个 Node.js 脚本来完成此任务。

https://github.com/liveduo/bittorrent-scripts/blob/main/3-connect-node.js

您可以在本地运行它,并且没有外部依赖项。您只需要一个 torrent(即,magnet id)和一个拥有该 torrent 的节点(即,节点 IP 地址和端口)。

存储库中有更多脚本可以获取拥有种子的节点。

如果您需要一些指导来让一切正常工作,我在here写了一篇文章,其中包含解释和交互式脚本,您可以直接在网站上运行。

© www.soinside.com 2019 - 2024. All rights reserved.