Understanding BEP Support
BitTorrent Enhancement Proposals (BEPs) are the standardized specifications that extend and improve the BitTorrent protocol. WebTorrent implements many of these proposals, with some differences between Node.js and browser environments.Browser implementations are limited by web platform capabilities. Features requiring UDP/TCP sockets or system-level networking are only available in Node.js.
Core Protocol Support
BEP 5: Distributed Hash Table (DHT)
Status: ✅ Node.js | ❌ Browser BEP 5 defines the distributed hash table for decentralized peer discovery.BEP 6: Fast Extension
Status: ✅ Node.js | ✅ Browser BEP 6 adds fast peer rejection and “have all/none” messages to improve performance. This extension is automatically enabled and handles:HAVE_ALLandHAVE_NONEmessagesSUGGEST_PIECEmessagesREJECT_REQUESTmessagesALLOWED_FASTmessages
BEP 9: Magnet Links
Status: ✅ Node.js | ✅ Browser BEP 9 enables downloading torrents using magnet URIs without .torrent files.BEP 10: Extension Protocol
Status: ✅ Node.js | ✅ Browser BEP 10 provides the framework for protocol extensions, enabling features like metadata exchange and peer exchange. See the Extensions documentation for details on creating custom extensions.Peer Discovery
BEP 11: Peer Exchange (PEX)
Status: ✅ Node.js | ⚠️ Browser (partial) BEP 11 enables peers to exchange peer lists, improving swarm connectivity.Browser PEX Limitations
Browser PEX Limitations
PEX in browsers is partially implemented. While the protocol works, browser peers can only exchange WebRTC peer information, not TCP/UDP peers. See issue #1191.
BEP 14: Local Service Discovery (LSD)
Status: ✅ Node.js | ❌ Browser BEP 14 discovers peers on the local network using UDP multicast.LSD cannot be implemented in browsers due to lack of multicast UDP support.
BEP 15: UDP Tracker Protocol
Status: ✅ Node.js | ❌ Browser BEP 15 defines the UDP tracker protocol for efficient tracker communication. Automatically used in Node.js when torrents have UDP tracker URLs (udp://...).
Web Seeds and HTTP
BEP 19: WebSeed - HTTP/FTP Seeding
Status: ✅ Node.js | ✅ Browser BEP 19 allows downloading from HTTP/FTP servers alongside peer-to-peer transfers.Web Seed Configuration
Web Seed Configuration
Configure maximum concurrent web seed connections per torrent:
Tracker Extensions
BEP 23: Tracker Returns Compact Peer Lists
Status: ✅ Node.js | ⚠️ Not implemented BEP 23 enables trackers to return peer lists in compact binary format. Supported in Node.js for efficient peer list parsing.BEP 48: Tracker Protocol Extension: Scrape
Status: ✅ Node.js | ✅ Browser BEP 48 allows querying tracker statistics without announcing. Automatically used when available.Privacy and Security
BEP 27: Private Torrents
Status: ✅ Node.js | ✅ Browser BEP 27 prevents DHT and PEX sharing for private tracker torrents.Transport Protocol
BEP 29: uTorrent Transport Protocol (uTP)
Status: ✅ Node.js | ❌ Browser BEP 29 defines the uTP protocol for congestion control and NAT traversal.uTP support requires the optional
utp-native dependency. Install with: npm install utp-nativeAdvanced Features
BEP 53: Magnet URI Extension - Select Specific Files
Status: ✅ Node.js | ✅ Browser BEP 53 enables selective file downloads using magnet links.Not Yet Implemented
The following BEPs are not currently implemented but may be added in the future:BEP 7: IPv6 Tracker Extension
BEP 7: IPv6 Tracker Extension
BEP 7 - IPv6 support for tracker communication.Status: Planned
BEP 44: Storing Arbitrary Data in DHT
BEP 44: Storing Arbitrary Data in DHT
BEP 44 - Store mutable and immutable data in the DHT.Status: Under consideration
BEP 46: Updating Torrents via DHT
BEP 46: Updating Torrents via DHT
BEP 46 - Dynamic torrent updates using DHT.Status: Planned - See issue #886
BEP 52: BitTorrent Protocol v2
BEP 52: BitTorrent Protocol v2
BEP 52 - Next generation BitTorrent protocol with improved hashing.Status: Planned - See issue #1117
Platform Comparison
Full BEP Support Comparison Table
Full BEP Support Comparison Table
| BEP | Feature | Node.js | Browser |
|---|---|---|---|
| 5 | DHT | ✅ | ❌ |
| 6 | Fast Extension | ✅ | ✅ |
| 9 | Magnet Links | ✅ | ✅ |
| 10 | Extension Protocol | ✅ | ✅ |
| 11 | Peer Exchange (PEX) | ✅ | ⚠️ |
| 14 | Local Service Discovery | ✅ | ❌ |
| 15 | UDP Tracker | ✅ | ❌ |
| 19 | WebSeeds | ✅ | ✅ |
| 23 | Compact Peer Lists | ✅ | ❌ |
| 27 | Private Torrents | ✅ | ✅ |
| 29 | uTP Protocol | ✅ | ❌ |
| 48 | Tracker Scrape | ✅ | ✅ |
| 53 | Selective Downloads | ✅ | ✅ |
- ✅ Fully supported
- ⚠️ Partially supported or limited
- ❌ Not supported (platform limitation)
Next Steps
Protocol Extensions
Learn how to create custom protocol extensions
Performance
Optimize your WebTorrent implementation