Glad to have found out such a interesting project, the concept is amazing!
I have read the post “Why Jami is distributed”, However I do have a few question regarding how the connection works, it’s complicated since I am using it in China. I am going to ignore TURN and name server, because they are really easy to block.
- Regarding the Opendht nodes. My understanding is that it works like this:
node1----------node2-----------node3 | | | node4----------node5-----------node6-------the great firewall------node7-----node8 | node001(my device)-----------one time connection-----node9(bootstrap) | node002(friend's device)-----one time connection--------
After node 001 and 002 made the one time connection with node9, they will join the opendht network, and connect to the closer (latency or geoip related) nodes, like nodes 1-6. No further connection towards node9 will ever be initiated, unless my device disconnects from the dht network.
Is my understanding correct?
- Regarding how connection towards each other works. Assuming my understanding of 1 is correct, now I have established the connection like this:
node1----------node2----------node3 | | | node4----------node5----------node6-------the great firewall------node7------node8 | | | ------------node001(my device) node9(bootstrap) | | ------------node002(friend's device)
Obviously if node001 and 002 are in the same private network, they’d connect to each other without a fuss, and I have tested and they would simply use local network to talk to each other.
Now if node001 and 002 are in difference private network, how would they connect to each other? I saw upnp as an option, what happens, when node001 is behind a gateway with upnp support, and node002 is behind double nat with a gateway that does not support upnp? In fact I have tried to use the video call function using mobile data from one device (I got a 100.*.*.* private IP behind ISP gateway) to connect to anther device on my home network without success.
EDIT: I have figured out the answer to this question, as long as one of the devices has upnp activated, the direct connection can be established. My connection problem was cause by the fact that Jami on Android only supports IGDv1 upnp, not IGDv2.
The most important question for me: what if node001 has multiple public IP addresses, how will it communicate with other nodes? Assume the following scenario: node001 has 2 internet connections available, there is a load balancer at network gateway, any traffic to certain geographic areas will be routed using network A(public IP 22.214.171.124), the rest will use network B(public IP 126.96.36.199). I have read in another blog post that the opendht network would store node information like IP addresses in the distributed network, if node001 connects to the bootstrap server using IP 188.8.131.52, but 184.108.40.206 is also available (and is a much closer route to node002), what will happen when node001 tries to connect to node002?
What exactly does the dhtproxy do? The blog post stated that it only notifies the node that something new happens, and the node should check it up. But I have tested, that if I disable bootstrap, the dhtproxy would still serve as a bootstrap. Quite confused here.
Thanks for everyone in advance for any help you provide, sorry if this seems like I have bombarded you with questions…