So, there comes a time when peer-to-peer networks such as BitTorrent conquer ever-increasing Internet space, but the final victory will come only when they become invisible to users and merge into one with the usual surfing on the Internet.
This will help them magnet (magnet link or just a magnet) . This is the first version of the p2p link, which is a universal and extensible standard, not tied to a specific network.
The concept of the Internet on magnets is to be independent of the software, protocol or method of data transfer. No matter how you get the file. Having a magnet, you can find the file and make sure that you received exactly what you ordered.
It begins, following the standards, with the name of the protocol (in the case of a magnet, different protocols are used for data transfer) the colon and the question (magnet :?), after which the link parameters immediately follow. Parameters can follow in any order, but p2p clients impose their limitations.
The most important parameter in a magnet is xt (eXact Topic).
magnet:?xt=urn:btih:QHQXPYWMACKDWKP47RRVIV7VOURXFE5Q
It contains the main difference between the magnet and the usual link (well, except for the absence of the main part of the url), namely the hash. The magnet hash is used to search and verify the integrity of the data (or file).
Next in importance are:
xl (eXact Length) - File size in bytes (not needed in torrents)
dn (Display Name) - Filename
as (Acceptable Source) - Web link to a file on the Internet
Well, the rest of the parameters can be found in the wiki.
A magnet can contain more than one hash, and thus allows you to use more than one p2p network to receive data.
magnet:?xt=urn:ed2k:354B15E68FB8F36D7CD88FF94116CDC1 &xl=10826029&dn=mediawiki-1.15.1.tar.gz &xt=urn:tree:tiger:7N5OAMRNGMSSEUE3ORHOKWN4WWIQ5X4EBOOTLJY &xt=urn:sha1:XRX2PEFXOOEJFRVUCX6HMZMKS5TWG4K5 &xt=urn:aich:7ZDRR3ZQW4JMHUQZUMJGQN2VNGLV3CVN &xt=urn:btih:QHQXPYWMACKDWKP47RRVIV7VOURXFE5Q
True, it does not guarantee the availability of sources in it. Some people have clients for several p2p networks, and, thanks to the correct
organizations, they can streamline the flow of data from one to another.
Magnets can also include http links that are familiar to us in the as (Acceptable Source) parameter. But only two p2p clients can use them - Shareaza and LimeWare.
magnet:?as=http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz
In the future, I hope that this situation will be corrected due to the fact that the browsers themselves learn to read the field as from the magnet and use it to obtain data in the absence of installed p2p clients. Well, now we can correct this situation by turning the magnet into a url + magnet. To do this, after the usual file reference after # add a magnet.
http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz#magnet:?xt=urn:btih:QHQXPYWMACKDWKP47RRVIV7VOURXFE5Q
By clicking on such a link, the browser cuts off the part after # (including the symbol itself) and sends the request, so the magnet remains invisible to the server (unfortunately this is not true for some Downloaders) and does not affect its operation in any way. If a file is unavailable, the user can erase from the address line the part preceding magnet:?, And by pressing Enter, start downloading the file from the p2p network. You can write a plugin or UserScript that will do this automatically.
Such links can also be used inside the HTML5 video container. And using the item to copy Url, we will copy not only the url, but also a magnet.
Also, such a record is closely linked url and magnet showing that this is the same file.
The end of the first part.
Source: https://habr.com/ru/post/136764/
All Articles