Magnet torrents
A magnet link does away with the middleman. A magnet link is essentially a hyperlink containing the hash code for that torrent, which your torrent client can immediately use to start finding people sharing those files. Magnet links don’t require a tracker (since it uses DHT, which you can read more about here ), nor does it require you to download a separate file before starting the download, which is convenient.
What Are Magnet Links, and How Do I Use Them to Download Torrents?
Soon, popular torrent site The Pirate Bay will no longer host torrent files . Instead, it will only offer magnet links. Magnet what now? You may have seen the term “magnet link” before, but if you haven’t used one, here’s the lowdown on what this change means for you as a BitTorrent user.
How Magnet Links Are Different From .Torrent Files
When you download a .torrent file, you’re essentially downloading a small file that contains information on the larger files you want to download. The torrent file tells your torrent client the names of the files being shared, a URL for the tracker, and more. Your torrent client then calculates a hash code, which is a unique code that only that torrent has—kind of like an ISBN or catalog number. From there, it can use that code to find others uploading those files, so you can download from them.
A magnet link does away with the middleman. A magnet link is essentially a hyperlink containing the hash code for that torrent, which your torrent client can immediately use to start finding people sharing those files. Magnet links don’t require a tracker (since it uses DHT, which you can read more about here ), nor does it require you to download a separate file before starting the download, which is convenient.
BitTorrent’s Future: DHT, PEX, and Magnet Links Explained
Last week The Pirate Bay confirmed it would shut down its tracker permanently, instead encouraging…
How to Use Magnet Links
Magnet links are dead simple to use. If you head to the Pirate Bay now, you’ll notice that magnet links are now the default, with the “Get Torrent File” link in parentheses next to it (a link which will disappear in a month or so). Just click on the magnet link, and your browser should automatically open up your default BitTorrent client and start downloading. It’s that easy.
What This Ultimately Means for You
The short answer is nothing. In fact, it could mean that downloading torrents takes one or two fewer clicks, since all you have to do is click on the link to start the download. When magnet links first came out, not all torrent clients supported them, but now you can use magnet links with just about any semi-popular torrent client out there—including our favorites uTorrent , Transmission , and Deluge , among others, so you shouldn’t notice a problem with that.
The Best BitTorrent Client for Windows
While you have a few choices of BitTorrent client on Windows, uTorrent is hands down the best we’ve
The main reason torrent sites are moving toward magnet links—apart from convenience to the user—is that these links (probably) free torrent sites like The Pirate Bay from legal trouble. Since The Pirate Bay won’t be hosting files that link to copyrighted content—that is, the torrent files—it’s more difficult to claim the site is directly enabling the downloading of copyrighted material. Whether this semantic leap actually protects torrent sites remains to be seen, but for now, you can sleep soundly knowing that the sites will stick around for awhile longer and that your torrents will take one less click to get started. If you want to read more about magnet links, check out the Wikipedia page on the subject .
Libraries
The following Javascript libraries are used on this page:
- sha1.js – SHA-1 hashing library
- bencode.js – Bencode encoding/decoding library
- base32.js – Base32 encoding/decoding library
They are primarly designed for web usage, but they can be trivially modified to be used with something such as node.js .
sha1.js
Computes the SHA-1 hash of the specified data using the basic algorithm described in RFC 3174 , with a paradigm similar to python’s hashlib . Data can be input in chunks, and the digest can be calculated at any point without modifying the internal state.
Public interface
- constructor()
Creates a new SHA1 hashing instance. - reset()
Resets the internal state of the instance. - update(value_array)
Update the internal state of the hashing object with the values contained in value_array .
value_array can be a string, with each character in the range [0,255] ; or a ( typed ) array, with each value in the range [0,255] . - digest() : Uint8Array
Computes and returns the SHA1 digest of all the data input so far. The return value is a Uint8Array of length 20 .
bencode.js
Encode/decode an object or string using the Bencode format.
Public interface
- encode(obj) : string
Encode obj into a Bencoded string.
obj can only be a string, number, array, or object. Arrays and objects can also only contain the aforementioned types. - decode(str) : [object | array | string | number]
throws “Invalid format”
Converts Bencoded str back into its original type. If data is malformed, an exception is thrown.
base32.js
Encode/decode a string using the RFC 4648 Base32 format.
Public interface
- encode(str) : string
Encode str into Base32. - decode(str) : string
Decode str from Base32 into its original string.
Other Javascript files
These are the other Javascript files included in this repository:
- sha1.test.js – Test case file similar to the one here
- t2m.loader.js – The loader file used to set up this page
- t2m.js – The main file used to process .torrent files on this page