You are not logged in.
- Topics: Active | Unanswered
#1 2010-01-16 14:00:01
- Seyss
- Member
How does a magnet link work? (first IP to connect)
Ok,
I've read countless articles on the web and they all hide the most basic information:
What is the first IP my torrent client connect to when opening a magnet link? I know once it finds the first IP, others can be fetched using Peer Exchange.
Give me an example of what is contained in a magnet link. All those hex values are what?
Thanks!
Offline
#2 2010-03-01 10:39:19
- psychogrowl
- Member
Re: How does a magnet link work? (first IP to connect)
Try this program: http://technet.microsoft.com/en-us/sysi … 97437.aspx
And watch the connections your torrent software makes when you add a magnet link. You should see the first IP it connects to, just be sure to remove everything else from your download and upload list first.
Offline
#3 2010-03-01 13:00:13
- Seyss
- Member
Re: How does a magnet link work? (first IP to connect)
Ok thanks.
But it's impossible that no one knows the answers? ![]()
Offline
#5 2010-03-01 13:02:45
- moogly
- Member

Re: How does a magnet link work? (first IP to connect)
Magnet links use DHT to find the rest of the info of the torrent.
Offline
#6 2012-02-24 02:00:35
- Robbert
- Member
Re: How does a magnet link work? (first IP to connect)
I'm sorry that I have to bump this thread, but I have the same exact question and answering the question "How does DHT find IPs?" with "It finds them using DHT" is not a good answer at all.
When I tried Googling for information on this, this was the only relevant link I found. It's ridiculous how hard it is to find information on this open technology.
Offline
#7 2012-02-24 07:36:16
- Seyss
- Member
Re: How does a magnet link work? (first IP to connect)
I agree
Offline
#8 2012-02-24 11:32:34
- Firon
- Administrator
Re: How does a magnet link work? (first IP to connect)
Offline
#9 2012-04-01 23:27:21
- Paradiddle
- Member
Re: How does a magnet link work? (first IP to connect)
The first IP you connect to (besides a DNS) is a server that provides a list of public IP's. These IPs can be used as entry points into the DHT network. This list is usually provided by the same people who make the bitTorrent client, though of course technically you can find a participating IP by any method that works (like asking a friend).
After you enter the network, you'll discover more IPs by using DHT lookups. It's likely that these IPs will be stored locally on your hard drive so you can just connect directly next time without fetching the bootstrap list first.
The magnet link contains a hash -- basically a unique ID -- which identifies the file you're looking for. It doesn't contain any IPs, nor does it need to. A hash is mathematically calculated from the exact contents of the file. Due to the extreme calculations involved, a hash nearly never refers to any other file on the planet. It's almost impossible to spoof.
Other users on the DHT network know about this hash -> contents relation, so when you say "someone, gimme the exact sequence of bytes that match this hash", they do, and you have your file!
Hope that explains things.
Offline
#10 2012-05-15 17:19:52
- dfine
- Member
Re: How does a magnet link work? (first IP to connect)
Magnet Links, How do they work???
http://www.youtube.com/watch?v=OvmvxAcT_Yc
Srsly though, the poster before me is correct. Hash functions take in a big file and output a short string of characters which are (nearly) unique for that file. Some common hash functions you can read about are md5 and sha1.
Since a file will always output the same "digest", you can use that instead of filenames to refer to the content you want.
Last edited by dfine (2012-05-15 17:22:38)
Offline
#11 2012-05-15 21:33:54
- kotekzot
- Banned
Re: How does a magnet link work? (first IP to connect)
technically, that's incorrect, dfine. a hash functions takes input of arbitrary length and produces output of fixed length. the input doesn't have to be big or a file.
Offline
#12 2013-02-23 06:37:13
- georgiecasey
- Member
Re: How does a magnet link work? (first IP to connect)
The initial bootstrap DHT peer on uTorrent is router.utorrent.com
Nobody answered the OPs question, I had the same question myself.
After the initial load, a cache of DHT peers is kept and used.
More reading:
http://stackoverflow.com/questions/1181 … otstrapped
http://stackoverflow.com/questions/1099 … t-first-ip
Offline
