Can we access some content from a specific peer

I have a question about “bypassing the routing” i.e. does it exist an option to directly fetch a file form a remote peer (without going though the remote peer gateway/api :5001)

is it possible to get /ipfs/QmbNTZjcQj4MWHobZsPxDSpCwQCBgvFfi7BYHw8zNYxj9T form a chosen peer
in the list of providers ?

for instance if
ipfs dht findprovs QmbNTZjcQj4MWHobZsPxDSpCwQCBgvFfi7BYHw8zNYxj9T
and if the peer QmQdXjkGwZWawvRTtra5wU4zJCCXqQLaKBfpgPDgJuTpgU has it
can I somehow do a

ipfs get /ip4/87.228.73.24/tcp/4001/ipfs/QmQdXjkGwZWawvRTtra5wU4zJCCXqQLaKBfpgPDgJuTpgU/ipfs/QmbNTZjcQj4MWHobZsPxDSpCwQCBgvFfi7BYHw8zNYxj9T ?

Why would you need to do this? The content is identical for a given hash regardless of which provider sends it to you.

1 Like

This is my 2 cents about the namesys protocol arround IPFS…
In fact I was imagining a way to get the mutables faster and avoid waiting for the 20 best candidates …

An ipns link is signed by it “owner” peer so if the peerid is online from the findprovs list then asking the file directly to that node is a shortcut to a valid and accurate mutable.

Need to be investigate to see if it is a viable approach, I am not skilled in go-lang to do the experiment myself, however I would be happy to partner with someone to get this further.

if the peer with public ip, maybe you can , but not sure /ip4/87.228.73.24/tcp/4001/ipfs/QmQdXjkGwZWawvRTtra5wU4zJCCXqQLaKBfpgPDgJuTpgU/ipfs/QmbNTZjcQj4MWHobZsPxDSpCwQCBgvFfi7BYHw8zNYxj9T is compatible with IPFS content bitswap.

The /ipfs/... path in your original post isn’t a mutable path and is unrelated to IPNS. When retrieving an /ipfs/ path there’s no waiting for 20 peers; there only needs to be one.

For /ipns/ mutable paths, if you don’t want to wait for 20 peers then the number of DHT records required to resolve them is configurable using the --dhtrc option. You could also set the --dhtt timeout to cause the DHT query to timeout faster and use what it has if there aren’t the desired number of DHT records.

Passing a peer hint to IPNS resolution seems like something that would require some code changes, but a workaround would be to connect to the known publishing peer right before requesting it.

ipfs connect /ip4/address/of/publishing/peer
ipfs name resolve /ipns/key/from/publishing/peer