How BEP 19 HTTP and FTP Seeding Works

BitTorrent Enhancement Proposal 19 (BEP 19), titled “WebSeed - HTTP/FTP Seeding (GetRight style),” defines a standardized mechanism allowing BitTorrent clients to download piece data from traditional web servers (HTTP) or FTP servers alongside standard peer-to-peer swarms. This specification bridges the gap between client-server architectures and decentralized networks, enabling content publishers to guarantee file availability, bootstrap new torrents without dedicated seedboxes, and provide fallback bandwidth when peer availability is low.

The url-list Metadata Key

BEP 19 implements web seeding by introducing a new key called url-list into the root or the info dictionary of a .torrent file. The url-list can contain either a single URL string or a list of URL strings pointing to HTTP or FTP endpoints hosting the target content. When a compatible BitTorrent client loads the torrent metadata, it reads this key and registers the provided URLs as WebSeeds.

Request Mechanics and Byte Ranges

To download pieces from a web server without requiring custom server-side BitTorrent software, BEP 19 utilizes standard HTTP Range headers (RFC 7233) and FTP REST commands.

Data Integrity and Verification

Even though data is retrieved over standard HTTP/FTP connections rather than the peer wire protocol, the torrent client treats the incoming data identically to peer-sourced data. Once a full piece is downloaded from the web server, the client computes its cryptographic SHA-1 hash and validates it against the corresponding hash in the torrent’s pieces string. If the hash fails, the downloaded data is discarded, preventing corrupted or tampered web data from entering the swarm.

Swarm Integration and Client Strategy

A standard client implementing BEP 19 treats an HTTP/FTP source as a specialized peer with distinct behaviors: