A Node.js implementation of the BitTorrent DHT protocol for peer discovery in trackerless torrents.
bittorrent-dht is a Node.js implementation of the BitTorrent Distributed Hash Table (DHT) protocol, which enables peer discovery for trackerless torrents. It allows BitTorrent clients to find peers without relying on central trackers by participating in a decentralized peer-to-peer network.
Developers building BitTorrent clients, peer-to-peer applications, or decentralized systems that require DHT-based peer discovery. It's particularly useful for projects like WebTorrent that need a robust, spec-compliant DHT implementation.
It offers a simple, robust, and fully-featured DHT implementation that strictly follows the BitTorrent protocol, supports advanced features like BEP 44 for data storage, and is battle-tested in production by major open-source projects.
🕸 Simple, robust, BitTorrent DHT implementation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Fully adheres to BEP 5 and BEP 44, ensuring interoperability with standard BitTorrent clients and support for mutable/immutable data storage.
Battle-tested in major projects like WebTorrent and peerflix, with a comprehensive offline test suite for reliable peer discovery in decentralized networks.
Implements recursive lookups that minimize UDP traffic and supports concurrent queries, reducing latency and optimizing bandwidth.
Allows custom node IDs, bootstrap servers, and integration with external cryptographic libraries for advanced features like ed25519 signatures.
Requires additional packages like ed25519-supercop for mutable data operations, complicating setup and adding maintenance overhead.
Routing table persistence is not automatic; developers must manually use toJSON() and addNode() for state recovery, which can be error-prone.
Tied to the Node.js runtime, limiting use in cross-platform applications or environments that require other programming languages.