开发者

how can i do NAT tunnel UDP hole punching in java?

开发者 https://www.devze.com 2023-03-28 01:28 出处:网络
how can i do NAT tunnel UDP hole punching in java? because of th开发者_如何学Pythonis, the A and B computer behind the different NAT can not receice the UDP packs which they send to each other.....

how can i do NAT tunnel UDP hole punching in java?

because of th开发者_如何学Pythonis, the A and B computer behind the different NAT can not receice the UDP packs which they send to each other.....

how can i solve this?


You need a server S with a public IP address. A and B should open a connection to S. This will open an UDP hole in the NAT. Then S can read the NAT translated address/port for A and B. Then S can send back this information to A and B who can start communicating directly on each other's open TCP port.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号