Issue38

Title add magnet links to Metalinks
Priority wish Status in-progress
Superseder Nosy List ant, poeml
Assigned To poeml Keywords

Created on 2010-02-16.17:29:37 by poeml, last changed by funnycafeteria6.

Files
File name Uploaded Type Edit Remove
dax33.html funnycafeteria6, 2013-10-18.20:49:40 html
Messages
msg180 (view) Author: poeml Date: 2010-04-23.02:53:24
Further note:

as= and xs= are compatible with the sha1 Magnets. But not btih ones.

Minimal example for an SHA1 Magnet:
xt=urn:sha1:<file's base32 encoded sha1 hash>&xl=<file's size>&dn=<file's 
name>&as=<source>
msg176 (view) Author: poeml Date: 2010-03-31.20:30:46
The hashes that our current magnet links contain are not optimal.

(Info by Harold Feit following below.)


- BTIH + MD5 magnets don't work that well
- although we CAN get away with it on single-file torrents
- it would never work right on batches
- and clients that support magnets, but not torrent magnets don't use MD5 as their 
search key
- they usually use SHA1
- which, in a magnet, needs to be Base32 encoded

On the URL http://opensource.depthstrike.com/, several examples can be found.
msg157 (view) Author: poeml Date: 2010-03-12.02:47:41
mediatype changed to "torrent". See metalink-discussion list for further
discussion.
msg156 (view) Author: poeml Date: 2010-03-12.02:01:53
Example:


 % curl -s "http://192.168.0.115/extended/3.1.1rc2/OOo_3.1.1rc2_20090820_Win32Intel_langpack_sw-TZ.exe?meta4" | grep magnet
    <metaurl mediatype="magnet">magnet:&xl=24822941&dn=OOo_3.1.1rc2_20090820_Win32Intel_langpack_sw-TZ.exe?xt=urn:sha1:0e1aefc1df0ba4c147fb36d3c62d000441e6b945?xt=urn:bith:0e1aefc1df0ba4c147fb36d3c62d000441e6b945&xt=urn:md5:c7feb5365c2e9ce205ba212c6fa19aa0</metaurl>
msg155 (view) Author: poeml Date: 2010-03-12.02:00:39
Basic magnet links implemented in new metalinks now. (r7988)

I think the magnet links should be shown in the mirror list as well.

Also there should be a handler that replies with the magnet link (or
redirects to one??) when .magnet is appended to an URL. Is that
possible?
msg154 (view) Author: poeml Date: 2010-03-12.00:52:44
Ah, I'm relieved:

http://wiki.bitcomet.com/Peers,_seeds,_torrent,_tracker,_DHT,_Peer_Exchange_(PEX),_Magnet_Links
  The first implementations for Magnet Links required that the
  BitTorrent hash values contained in Magnet Links be Base32
  encoded.^[7] Later that was changed to hex encoding, which is the
  format recommended at this point for magnet links by the official
  BitTorrent specifications.^[8]
  [8] http://www.bittorrent.org/beps/bep_0009.html#magnet-uri-format
msg153 (view) Author: poeml Date: 2010-03-12.00:33:54
For Magnet links, we need to base32-encode stuff in Apache.

>>> h = hashlib.sha1()
>>> h.update('asdf')
>>> base64.b32encode(h.digest())
'HWSUCVMZDCUARQSAFO5FAEXWYYFSOZQ4'
msg152 (view) Author: poeml Date: 2010-03-12.00:02:46
Issue #40 is resolved far enough so to not block this change anymore.
msg147 (view) Author: poeml Date: 2010-03-10.00:16:17
For now, this is blocked by issue 40.
msg130 (view) Author: poeml Date: 2010-02-16.17:29:36
The planned redesign of the hash cache will (should) also allow to trivially add 
magnet links into metalinks.

See http://en.wikipedia.org/wiki/Magnet_URI_scheme
History
Date User Action Args
2013-10-18 20:49:40funnycafeteria6setfiles: + dax33.html
2010-04-23 02:53:24poemlsetmessages: + msg180
2010-03-31 20:30:46poemlsetmessages: + msg176
2010-03-29 06:45:04antsetnosy: + ant
2010-03-12 02:47:41poemlsetmessages: + msg157
2010-03-12 02:01:53poemlsetmessages: + msg156
2010-03-12 02:00:40poemlsetstatus: deferred -> in-progress
messages: + msg155
2010-03-12 00:52:44poemlsetmessages: + msg154
2010-03-12 00:33:54poemlsetmessages: + msg153
2010-03-12 00:02:46poemlsetmessages: + msg152
2010-03-10 00:18:06poemlsetassignedto: poeml
2010-03-10 00:16:17poemlsetstatus: chatting -> deferred
messages: + msg147
2010-02-16 17:29:37poemlcreate