How to view the IP addresses hosting a particular file?

Is there a function to see the IP addresses which are hosting a particular file?

1 Like

You can do that with the dht.findprovs API method. This is how you find peers with the content you want, so you can request the content from them.

1 Like

With dht.findprovs you can find the ID of the peers that are saying that they have the specific content. Then you can use that ID to get the addresses that the peer is listening on. One example of this:

$ ipfs dht findprovs QmUvGoyv8hBprTqjFnhD5m4HGkcxqS4FoNteKEbYmyLj9n
QmUH8QCsWBpWoNn3ZvfiTJBFQKGqH5DnNonrqs1NXcHCxg
QmWVHuN2auMKA3KrqS9ESi4o22L8ar6zm46Aojnex1rpyt
QmWdXGxTbksALKkxeRiZKsWKGSpiq4CL2VjFeBXq2uENod
QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm

$ ipfs dht findpeer QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm 
/ip4/127.0.0.1/tcp/8081/ws
/ip4/127.0.0.1/tcp/4001
/ip4/162.243.248.213/tcp/4001
/ip4/172.17.0.1/tcp/4001
/ip6/::1/tcp/4001
/ip6/2604:a880:0:1010::23:d001/tcp/4001
/ip6/fcfe:eab4:e49c:940f:8b29:35a4:8ea8:b01a/tcp/4001
5 Likes

Hi all,

Some help here please.

Is the method still working. I have no results while using my own: QmaMz5QmsAauRrM9agJtWURfa19bAihDaCyy2cghNknS4M

When trying findprovs or findpeers i get: error routin not found.

But i know it is running, so any ideas?
Thanx

Same result with ipfs 0.8 dht findprovs returns nothing while get returns cached Qm…S4M from my node.

Hi all, i really could use some help!!!

Daemon is running.
ipfs dht findprovs works as well
ipfs dht findpeer keeps returning: Error: routing: not found