|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | == Torrent file ==
| + | = Torrent File = |
| | | |
− | A '''torrent file''' is a small [[Computer file|file]] that contains [[Metadata]] used by the [[BitTorrent]] [[Peer-to-peer|peer-to-peer file sharing]] protocol. It does **not** contain the actual content to be shared (like a video or software). Instead, it acts as a roadmap and manifest for [[BitTorrent client|BitTorrent clients]], providing information about the files to be downloaded, their sizes, the locations of [[Tracker (BitTorrent)|trackers]] that coordinate the file sharing, and [[Integrity (computer security)|integrity]] checks for the data. | + | A '''torrent file''' (with the .torrent extension) is a small computer file that contains metadata about files and folders to be distributed, and a list of the network locations of trackers, which are computers that coordinate the [[BitTorrent]] network. It does not contain the content itself, but rather information necessary for a BitTorrent client to download or upload the actual data from other users (peers) on the network. |
| | | |
− | Torrent files are typically created and shared by users who wish to distribute a file or set of files using the [[BitTorrent]] protocol. Users download the `.torrent` file, which they then open with a [[BitTorrent client|BitTorrent client]] application. The [[BitTorrent client|client]] uses the information in the torrent file to connect to other users ([[:wikt:peer|peers]]) who are also downloading or uploading the same content, facilitating the decentralized [[File sharing|file sharing]] process.
| |
| | | |
− | === BitTorrent Protocol Overview ===
| |
| | | |
− | The [[BitTorrent]] protocol is a [[Peer-to-peer|peer-to-peer]] (P2P) [[Communication protocol|protocol]] designed for efficient distribution of large files. Unlike traditional [[Client–server model|client-server]] models where all downloaders get the file from a single source, [[BitTorrent]] allows users to download pieces of the file from multiple sources simultaneously – specifically, from other users who have already downloaded parts of the file.
| + | == See Also == |
| | | |
− | The process typically works as follows:
| + | *[[BitTorrent]] |
− | 1. A user wanting to share files creates a [[Torrent file|torrent file]] using a [[BitTorrent client|client]].
| |
− | 2. The creator (initial [[Seeding (BitTorrent)|seeder]]) distributes the [[Torrent file|torrent file]] (often via a [[Torrent file#Indexers and Search Engines|torrent indexer website]]).
| |
− | 3. Other users download the [[Torrent file|torrent file]].
| |
− | 4. A user opens the [[Torrent file|torrent file]] with their [[BitTorrent client|client]].
| |
− | 5. The [[BitTorrent client|client]] connects to the [[Tracker (BitTorrent)|tracker]] specified in the [[Torrent file|torrent file]] (or uses [[Distributed Hash Table|DHT]] for trackerless torrents) to find other [[Peer (computing)|peers]] who have the file.
| |
− | 6. The [[BitTorrent client|client]] downloads small pieces (chunks) of the file from various [[Peer (computing)|peers]] in the [[Swarm (BitTorrent)|swarm]].
| |
− | 7. As a user downloads pieces, they also upload those pieces to other [[Peer (computing)|peers]] in the [[Swarm (BitTorrent)|swarm]], contributing back to the network.
| |
− | 8. Once a user has downloaded all pieces, they become a [[Seeding (BitTorrent)|seeder]] and can continue uploading the full file to others.
| |
| | | |
− | === Structure of a Torrent File ===
| + | [[Category:Information]] |
− | | |
− | A torrent file is encoded using [[Bencode]], a simple [[Serialization|serialization]] format used by [[BitTorrent]]. The main structure is a [[Dictionary (data structure)|dictionary]] containing several key-value pairs. The two most important keys are:
| |
− | | |
− | * '''announce''': The [[URL]] of the [[Tracker (BitTorrent)|tracker]] server. The [[BitTorrent client|client]] contacts the [[Tracker (BitTorrent)|tracker]] to join the [[Swarm (BitTorrent)|swarm]] and get a list of other [[Peer (computing)|peers]].
| |
− | * '''info''': A [[Dictionary (data structure)|dictionary]] containing information about the content being shared. This is the core of the torrent file and includes:
| |
− | * '''name''': The name of the main directory or file.
| |
− | * '''piece length''': The size of each segment (or piece) the file is divided into for transfer. Files are broken into fixed-size pieces (e.g., 256 [[Kilobyte|KB]] or 1 [[Megabyte|MB]]).
| |
− | * '''pieces''': A concatenation of the [[Cryptographic hash function|SHA-1 hash]] of each piece. This list of hashes allows the [[BitTorrent client|client]] to verify the [[Integrity (computer security)|integrity]] of each piece after downloading it, ensuring the data is not corrupted.
| |
− | * '''files''' (if sharing multiple files): A list of dictionaries, each describing a file (path, length, etc.).
| |
− | * '''length''' (if sharing a single file): The total length of the file in [[Byte (unit)|bytes]].
| |
− | | |
− | Optional keys can also be present, such as `creation date`, `comment`, `created by`, and `encoding`.
| |
− | | |
− | === Key Concepts within BitTorrent ===
| |
− | | |
− | * '''[[Peer (computing)|Peers]]:''' Any computer participating in a [[BitTorrent]] swarm that is currently transferring data. Peers can be either [[Seeding (BitTorrent)|seeders]] or [[Peer (BitTorrent)#Leecher|leechers]].
| |
− | * '''[[Seeding (BitTorrent)|Seeders]]:''' [[Peer (BitTorrent)|Peers]] that have a complete copy of the file(s) being shared in the [[Swarm (BitTorrent)|swarm]] and are currently uploading parts of it to others. Seeders are essential for the health of a [[Swarm (BitTorrent)|swarm]].
| |
− | * '''[[Peer (BitTorrent)#Leecher|Leechers]]:''' [[Peer (BitTorrent)|Peers]] that are currently downloading the file(s) but do not yet have a complete copy. They are actively downloading and, if the [[BitTorrent client|client]] is configured correctly, uploading downloaded pieces simultaneously.
| |
− | * '''[[Swarm (BitTorrent)|Swarm]]:''' The collective group of all [[Peer (BitTorrent)|peers]] ([[Seeding (BitTorrent)|seeders]] and [[Peer (BitTorrent)#Leecher|leechers]]) currently involved in transferring a specific [[Torrent file|torrent]].
| |
− | * '''[[Tracker (BitTorrent)|Tracker]]:''' A [[Server (computing)|server]] that helps [[BitTorrent client|BitTorrent clients]] find each other. When a [[BitTorrent client|client]] starts a download, it contacts the [[Tracker (BitTorrent)|tracker]] using the [[URL]] from the [[Torrent file|torrent file]]. The [[Tracker (BitTorrent)|tracker]] doesn't have the file content but keeps track of which [[Peer (BitTorrent)|peers]] are in the [[Swarm (BitTorrent)|swarm]] and provides a list of [[Peer (BitTorrent)|peers]] to the client.
| |
− | * '''[[Distributed Hash Table|Distributed Hash Table (DHT)]]:''' A [[Decentralization|decentralized]] system used by modern [[BitTorrent client|BitTorrent clients]] to find [[Peer (computing)|peers]] without relying on a central [[Tracker (BitTorrent)|tracker]] server. Torrent files that support [[Distributed Hash Table|DHT]] (often indicated by not having an `announce` key or having a `nodes` key) are called "trackerless" torrents.
| |
− | * '''[[Torrent file#Indexers and Search Engines|Indexers and Search Engines]]:''' Websites or applications that host [[Torrent file|torrent files]] and allow users to search for content. These are often the primary method for users to find and download `.torrent` files.
| |
− | | |
− | === How Downloads Work ===
| |
− | | |
− | When a [[BitTorrent client|BitTorrent client]] opens a [[Torrent file|torrent file]], it first connects to the [[Tracker (BitTorrent)|tracker]] or uses [[Distributed Hash Table|DHT]] to discover other [[Peer (computing)|peers]] in the [[Swarm (BitTorrent)|swarm]]. It then begins requesting pieces of the file(s) from available [[Peer (computing)|peers]].
| |
− | | |
− | The protocol uses strategies like "rarest first" to prioritize downloading pieces that are least common in the [[Swarm (BitTorrent)|swarm]], helping to ensure that all pieces remain available. As pieces are downloaded, the [[BitTorrent client|client]] verifies their [[Integrity (computer security)|integrity]] using the [[Cryptographic hash function|SHA-1 hash]] provided in the [[Torrent file|torrent file]]. Once a piece is verified, it becomes available for the client to upload to other [[Peer (computing)|peers]], fostering cooperative sharing.
| |
− | | |
− | === Creation of Torrent Files ===
| |
− | | |
− | Creating a torrent file involves selecting the file(s) to be shared, specifying the piece size, and optionally adding [[Tracker (BitTorrent)|tracker]] URLs. The [[BitTorrent client|client]] software calculates the [[Cryptographic hash function|SHA-1 hash]] for each piece and bundles all this [[Metadata]] into the `.torrent` file. This file can then be distributed.
| |
− | | |
− | === Legality and Controversies ===
| |
− | | |
− | The [[BitTorrent]] protocol and the use of [[Torrent file|torrent files]] are, in themselves, just [[Technology|technology]] for [[File sharing|file sharing]]. They are widely used for legitimate purposes, such as distributing large [[Open-source model|open-source software]] downloads, public domain works, or large data sets, as it significantly reduces the burden on the content provider's [[Server (computing)|servers]].
| |
− | | |
− | However, the protocol is also frequently used for the unauthorized distribution of [[Copyright infringement|copyrighted material]], which is illegal in most jurisdictions. This association with [[Copyright infringement|copyright infringement]] has led to controversies, legal challenges against [[Tracker (BitTorrent)|tracker]] operators and [[Torrent file#Indexers and Search Engines|indexer websites]], and efforts by [[Internet Service Provider|ISPs]] to limit [[BitTorrent]] traffic.
| |
− | | |
− | === See Also ===
| |
− | | |
− | * [[BitTorrent]]
| |
− | * [[Peer-to-peer]]
| |
− | * [[File sharing]]
| |
− | * [[Tracker (BitTorrent)]]
| |
− | * [[Distributed Hash Table]]
| |
− | * [[BitTorrent client]]
| |
− | * [[Magnet URI scheme|Magnet link]] - Another way to identify BitTorrent content without a `.torrent` file.
| |
− | * [[Copyright infringement]]
| |
− | * [[Peer (BitTorrent)]]
| |
− | * [[Seeding (BitTorrent)]]
| |
− | * [[Swarm (BitTorrent)]]
| |
− | | |
− | === References ===
| |
− | | |
− | * [https://www.bittorrent.org/beps/bep_0003.html BitTorrent.org - The BitTorrent Protocol Specification] - The technical specification for the protocol and .torrent file structure.
| |
− | * [https://www.eff.org/issues/file-sharing Electronic Frontier Foundation - File Sharing] - Discusses file sharing technologies and legal aspects.
| |
− | * [https://computer.howstuffworks.com/bittorrent.htm HowStuffWorks - How BitTorrent Works] - An explanation of the protocol for a general audience.
| |
− | | |
− | [[Category:BitTorrent]]
| |
− | [[Category:File sharing]]
| |
− | [[Category:Peer-to-peer]]
| |
− | [[Category:Computer file formats]]
| |
− | [[Category:Internet protocols]]
| |
− | [[Category:Software engineering]] | |