|
|
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 [[tracker]]s, 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.
| + | == How it Works == |
| + | The BitTorrent protocol facilitates peer-to-peer file sharing, and the torrent file is the entry point for this process: |
| | | |
− | === BitTorrent Protocol Overview ===
| + | Creation: A user (the "seeder") creates a torrent file for a specific file or set of files they wish to share. The torrent file is generated by calculating cryptographic hashes of small segments (or "pieces") of the original data. This allows integrity checking during transfer. |
| | | |
− | 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. | + | Distribution: The .torrent file is then distributed, typically by being uploaded to a public website (a "torrent indexer"). |
| | | |
− | The process typically works as follows:
| + | Downloading (Leeching): A user (the "leecher") interested in downloading the content obtains the .torrent file and opens it with a BitTorrent client. |
− | 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 ===
| + | Connecting to Tracker/DHT: The client connects to a tracker server (specified in the torrent file) or uses a [[Distributed Hash Table (DHT)]] to find other peers who have parts of, or the entire, file. |
| | | |
− | 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:
| + | Piece-by-Piece Transfer: The client downloads different pieces of the file from multiple peers simultaneously. As the client downloads pieces, it also begins to upload those pieces to other peers, becoming a "seeder" itself (even if it hasn't completed the download). |
| | | |
− | * '''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]].
| + | Reassembly: Once all pieces are downloaded, the BitTorrent client reassembles them into the original file(s). |
− | * '''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`.
| + | == Components of a Torrent File == |
| + | A .torrent file is a Bencode-encoded dictionary containing several key pieces of information: |
| | | |
− | === Key Concepts within BitTorrent ===
| + | '''announce (optional):''' The URL of the tracker. This server helps peers find each other. |
| | | |
− | * '''[[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]].
| + | '''info (dictionary):''' This dictionary contains the metadata about the content being shared: |
− | * '''[[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 ===
| + | '''name:''' The name of the file or directory. |
| | | |
− | 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]].
| + | '''piece length:''' The size of each piece of the file(s) in bytes. |
| | | |
− | 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.
| + | '''pieces:''' A concatenated string of the SHA-1 hash of each piece. This is crucial for verifying the integrity of downloaded data. |
| | | |
− | === Creation of Torrent Files ===
| + | '''length (for single file) or files (for multiple files):''' The total size of the file(s) or a list of dictionaries with length and path for multiple 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.
| + | '''creation date (optional):''' The date the torrent was created. |
| | | |
− | === Legality and Controversies ===
| + | '''comment (optional):''' A free-form comment. |
| | | |
− | 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]].
| + | '''created by (optional):''' Name and version of the program used to create the torrent. |
| | | |
− | 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.
| + | '''encoding (optional):''' The character encoding used for the metadata. |
| | | |
− | === See Also === | + | == Legality and Use Cases == |
| + | The BitTorrent protocol and .torrent files are neutral technologies. Their legality depends entirely on the content being shared. |
| | | |
− | * [[BitTorrent]]
| + | Legal Uses: BitTorrent is a highly efficient way to distribute large files to many users. It is used for: |
− | * [[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 ===
| + | Distributing open-source software (e.g., Linux distributions). |
| | | |
− | * [https://www.bittorrent.org/beps/bep_0003.html BitTorrent.org - The BitTorrent Protocol Specification] - The technical specification for the protocol and .torrent file structure.
| + | Sharing public domain works or content with appropriate licenses. |
− | * [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]] | + | Software updates and patches by legitimate publishers. |
− | [[Category:File sharing]] | + | |
− | [[Category:Peer-to-peer]] | + | Distributing large datasets in scientific communities. |
− | [[Category:Computer file formats]] | + | |
− | [[Category:Internet protocols]] | + | Online gaming platforms for game distribution. |
− | [[Category:Software engineering]] | + | |
| + | Illegal Uses: Unfortunately, torrent files are often associated with the unauthorized distribution of copyrighted material, which is illegal in most jurisdictions. [[Pulsed Media]] is not responsible for users using torrent file to illegally share or download copyrighted material. Client is solely responsible for every file in [[Pulsed Media]] server userspace. |
| + | |
| + | == See Also == |
| + | |
| + | *[[BitTorrent]] |
| + | *[[Peer-to-peer]] |
| + | *[[Tracker]] |
| + | *[[Seeder]] |
| + | *[[Leecher]] |
| + | |
| + | [[Category:Information]] |
| + | [[Category:Pulsed Media]] |
Torrent File
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.
How it Works
The BitTorrent protocol facilitates peer-to-peer file sharing, and the torrent file is the entry point for this process:
Creation: A user (the "seeder") creates a torrent file for a specific file or set of files they wish to share. The torrent file is generated by calculating cryptographic hashes of small segments (or "pieces") of the original data. This allows integrity checking during transfer.
Distribution: The .torrent file is then distributed, typically by being uploaded to a public website (a "torrent indexer").
Downloading (Leeching): A user (the "leecher") interested in downloading the content obtains the .torrent file and opens it with a BitTorrent client.
Connecting to Tracker/DHT: The client connects to a tracker server (specified in the torrent file) or uses a Distributed Hash Table (DHT) to find other peers who have parts of, or the entire, file.
Piece-by-Piece Transfer: The client downloads different pieces of the file from multiple peers simultaneously. As the client downloads pieces, it also begins to upload those pieces to other peers, becoming a "seeder" itself (even if it hasn't completed the download).
Reassembly: Once all pieces are downloaded, the BitTorrent client reassembles them into the original file(s).
Components of a Torrent File
A .torrent file is a Bencode-encoded dictionary containing several key pieces of information:
announce (optional): The URL of the tracker. This server helps peers find each other.
info (dictionary): This dictionary contains the metadata about the content being shared:
name: The name of the file or directory.
piece length: The size of each piece of the file(s) in bytes.
pieces: A concatenated string of the SHA-1 hash of each piece. This is crucial for verifying the integrity of downloaded data.
length (for single file) or files (for multiple files): The total size of the file(s) or a list of dictionaries with length and path for multiple files.
creation date (optional): The date the torrent was created.
comment (optional): A free-form comment.
created by (optional): Name and version of the program used to create the torrent.
encoding (optional): The character encoding used for the metadata.
Legality and Use Cases
The BitTorrent protocol and .torrent files are neutral technologies. Their legality depends entirely on the content being shared.
Legal Uses: BitTorrent is a highly efficient way to distribute large files to many users. It is used for:
Distributing open-source software (e.g., Linux distributions).
Sharing public domain works or content with appropriate licenses.
Software updates and patches by legitimate publishers.
Distributing large datasets in scientific communities.
Online gaming platforms for game distribution.
Illegal Uses: Unfortunately, torrent files are often associated with the unauthorized distribution of copyrighted material, which is illegal in most jurisdictions. Pulsed Media is not responsible for users using torrent file to illegally share or download copyrighted material. Client is solely responsible for every file in Pulsed Media server userspace.
See Also