Saturday, June 15, 2019

P2P over proxy?

User U1 uses a peer-to-peer chat client that lets him connect to user U2 and initiate a chat session. The client creates an endpoint by binding U1's public IP address to some port and then generates a string which U1 can share with U2 via some other means (WhatsApp or whatever). The string basically encodes U1's IP address and port, which U2 can pass to the same chat client so that it can decode IP and port details out of that string and make a connection request to U1. Upon U1's confirmation, a session is successfully created.

My question:

a) Is the idea anywhere close to how peer-to-peer clients and libraries (like jitsi) work?

b) What if all the traffic to and from U1's client is (SOCKS) proxied and U2 gets the IP address of the proxy server instead? The connection request from U2 fails right? How real world clients/libraries deal with (or avoid) such issues?



No comments:

Post a Comment