How to connect private members in different networks

I’m using ipfs version 0.4.16
I am not able to connect private members in different networks for transfering files. I am getting all the peers id in the ipfs swarm peers. How to connect with the other nodes?

Are they two different private IPFS networks? If so, is there a reason they’re not the same private network?

yes, two different private IPFS networks.
as of the requirement i want to send files to a particular person they are in a different network, but i don’t want to send the file hash key to ipfs server.

I don’t know what you mean by “ipfs server” here (whose server?), but if the nodes are in different private IPFS networks, then they can’t communicate by design. They’ll either need to become part of the same private network, or the two nodes will need to join a temporary shared private network to share the file and then rejoin their separate private networks after the transaction.

how to connect two nodes are in different network and share the files to each other, file should not go to the ipfs server. if two nodes are in same network i can do using private network method that is working.
please tell me how to do that…