What Are Magnetic Forces?
Magnet URI scheme is a computer program for searching information and downloading documents in a peer-to-peer network. Different from the Uniform Resource Locator (URL) based on the "location" connection, the magnetic link is based on the metadata file content and belongs to the Uniform Resource Name (URN). In other words, the magnetic link is not based on the IP address or locator of the document, but in a distributed database, the document is identified and searched by the hash function value to download the document. Because it does not rely on a host in the startup state to download documents, it is particularly suitable for peer-to-peer networks without a central server. For example, a common form of magnetic link is "magnet:? Xt = urn: btih:".
- This draft of the standard appeared in 2002 and was developed for vendor- and project-neutral generalization of the two URI formats of "ed2k:" and Freenet: "freenet:" of eDonkey2000. At the same time, this standard also attempts to closely follow the IETF official URI standard.
- As we all know,
- The most common use of magnetic linking is to link to a specific file based on the hash function value of the file content, generating a unique file identifier, similar to an ISBN. Unlike regular identifiers, the content hash can be generated by anyone who holds the file, so there is no need for a central authority, which makes it often used as a search condition in the file sharing field, because anyone can Distribute a magnetic link to ensure that the resource pointed to by the link is what he wants, regardless of how he got it. [2-3]
- A magnetic link consists of a set of parameters, and the order between the parameters is not particular. Its format is the same as the query string at the end of the HTTP link. It is usually a URN formed by the value of the hash function of a specific file, for example:
magnet:? xt = urn: btih : 4D9FA761D69964B00DF0B3B0C9C1F968EA6C47D0 & xt = urn: ed2k: 7655dbacff9395e579c4c9cb49cbec0e & dn = bbb_sunflower_2160p_30fps_stereo_abl.mp4 & tr = udp% 3a% 2f% 2ftracker.openbittorrent.com% 3a80% 2fannounce & tr = udp% 3a% 2f% 2ftracker.publicbt.com % 3a80% 2fannounce & ws = http% 3a% 2f% 2fdistribution.bbb3d.renderfarming.net% 2fvideo% 2fmp4% 2fbbb_sunflower_2160p_30fps_stereo_abl.mp4
Although this link points to a specific file, the client application must still search to determine where.
The definition of other parameters in the standard draft is as follows:
- magnet : protocol name.
- xt : Abbreviation for exact topic, a uniform resource name containing a file hash. BTIH (BitTorrent Info Hash) represents the hash method name. Here you can also use ED2K, AICH, SHA1 and MD5. This value is the file identifier and is indispensable.
- dn : Abbreviation for display name, which indicates the file name displayed to the user. This item is optional.
- tr : The abbreviation of tracker, which indicates the address of the tracker server. This item is also optional.
- ws : Abbreviation for webseed, which stands for network seed.
- urn : (Uniform Resource Name, URN represents the resource name
- btih: BitTorrent info hash, seed hash function
- Application-defined experimental parameters must begin with "x.". [4-5]
- This part of the magnetic link is the most important. Used to find and verify files that contain magnetic links.
TTH (Tiger Tree Hash Function)
TigerTree hash functions are used in several networks including Direct Connect and Gnutella2.
xt = urn: tree: tiger: [TTH Hash (Base32)]
SHA-1 (Secure Hash Algorithm 1)
The hash function used by Gnutella and Gnutella2.
xt = urn: sha1: [SHA-1 Hash (Base32)]
BitPrint
This hash function consists of a SHA-1 hash function and a TTH hash function, separated by ".".
Gnutella and Gnutella2 are used.
xt = urn: bitprint: [SHA-1 Hash (Base32)]. [TTH Hash (Base32)]
eD2k Hash (eDonkey2000) The hash function algorithm used by eDonkey2000.
xt = urn: ed2k: [ED2K Hash (Hex)]
AICH (Advanced Intelligent Damage Handling)
Not part of the official magnetic link. The hash function algorithm used by eDonkey2000 is used to store and control the integrity of files that are downloaded and are being downloaded.
xt = urn: aich: [aich Hash (Base32)]
The hash function algorithm used by Kazaa hash function FastTrack.
xt = urn: kzhash: [Kazaa Hash (Hex)]
BTIH (BitTorrent Info Hash)
The hash function algorithm used by BitTorrent. For backward compatibility reasons, the client needs to support both the BTIH hash result encoded by Base32.
xt = urn: btih: [BitTorrent Info Hash (Hex)]
MD5 (Information-Digest Algorithm 5)
Gnutella2 supports hash function algorithms.
xt = urn: md5: [MD5 Hash (Hex)]
CRC-32 (cyclic redundancy check)
Not part of the official magnetic link. There is no known P2P network use.
xt = urn: crc32: [CRC-32 (Base10)]
- "as" means "acceptable source". This link points to a direct download from a web server. It will only link after a specified timeout, preventing server overload. The client will spend some time locating the file in the P2P network before considering sending a download request to the server.
as = [File's web link (encoded URL)]
- The link can be an HTTP (SHTTP, FTP, SFTP, etc.) download source, a P2P source address of the file, or a hub (when using DC ++) link to the magnetically linked file. For this link, the client attempts to link directly and requests the file or its source, sometimes both. This field is often used by P2P clients to store sources. References may include file hashes.
Content Addressing Network (CAN) URL
This type of link is used by Gnutella and G2 applications and is based on RFC 2168.
xs = http: // [client address]: [client port] / uri-res / N2R? [urn containing a file hash]
example:
xs = http: //192.0.2.0.27: 6346 / uri-res / N2R? urn: sha1: FINYVGHENTHSMNDSQQYDNLPONVBZTICF
The link to the DirectConnect hub and find the source for the file immediately connects the DirectConnect client to the hub just discussed.
xs = dchub: // [hub address]: [hub port]
Refer to the web-based source cache for the files on Gnutella2. In this case, the point contained in the link is not the client IP or direct source, but the source cache. Such a cache does not contain the file itself, but instead stores the IP of other clients who connect to the cache to download the same file. Once the client connects to the cache and obtains the IP of another alternative source, its own IP will be stored in the cache, then continue to connect to the next cache, and continue to request the alternative source. This system is similar to the operation of the BitTorrent tracker.
xs = http: //cache.freebase.be/ [SHA-1 hash]
Reference ED2K source xs = ed2k: // [client address]: [client port] / [ed2k hash] / [file size] /
Client | Starting Supported Version |
---|---|
Torrent | 1.8 |
BitComet | 1.17 |
BitSpirit | 3.6.0.126 |
Thunder | 5.9.17 |
Transmission | 1.80 |
qBittorrent | 1.5.0 |
NeoLoader | 0.10 Public Beta Release |
In addition, applications that support magnetic linking include Vuze, BearShare, DC ++, Deluge, gtk-gnutella, Kazaa, LimeWire, FrostWire, MP3 Rocket, Morpheus, Shareaza, MLdonkey, aMule, KCeasy and TrustyFiles.
- Earlier we said that "magnetic link" is used to index the files to be downloaded through the DHT network. Therefore, in some environments, the problem of "acquiring magnetic link information" may take a long time or the acquisition may fail. Due to the lack of experience in related issues, there is no clear solution other than retry.