nat-traversal

Behind NAT to behind NAT connection

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 03:23:46
问题 I've come across an interesting problem. Basically I have 2 mobile phones that are both behind NATs. I want to communicate directly between the 2 devices using UDP. I know if I initiate a connection from the phones to a server then I can push data back down that connection to the phone (ie send it back from the same port that received the message to the same ip and port that it was received from). So I can easily communicate between the 2 devices by connecting both phones to the server. Then