Let’s say data is available with three nodes (n1, n2, n3) and our node(n4) wants to get the data of that file and is connected to all the three nodes(swarm connected).
But I don’t want to pull data from n1 even if I am connected and data is available.
Is there any way to achieve this?
I’m afraid not, not out of the box
You can use a connection filter to not connect them, or even just configure n4’s firewall to send REJECT when trying to connect to N1 ip + port (as well as when N1 connects to N4’s IPFS port + ip).
But that not really what you want since this just avoid making N1 and N4 be able to talk together.
In a private network, when the nodes are not under the same network, they have to get connected to a relay node and then connect to the other node.
Is there a way of the two nodes connecting to each other rather than connecting through relay node when they are in different network?
in bitswap when the requesting node knows that it’s data is there with say 2 other nodes and I don’t want to pull data from one of the node and I know its peerID, then I can avoid it by skipping that request right ? In bitswap package?