NAT translation not working from inside the network (hairpin condition)

前端 未结 2 1815
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 14:20

I\'m writing a P2P application. Peers regularly ping a main server to update their current IP/port, so when a peer wants to reach another one it can ask the server for that

2条回答
  •  天命终不由人
    2020-12-06 14:56

    Interactive Connectivity Establishment (ICE) was specifically developed for solving that type of NAT problems. It uses STUN and TURN to achieve the result and is used in modern p2p applications. (e.g. Voicechat)

    The PJNATH library has a document explaining

    unlike standalone STUN solution, it (ICE) solves the hairpinning issue, since it also offers host candidates.

提交回复
热议问题