How do I make a TCP server work behind a router (NAT) without any redirection configuration needed

前端 未结 4 678
孤独总比滥情好
孤独总比滥情好 2020-12-09 11:34

The scenario is the following. I have two machines A and B: A: Client (behind NAT) B: Server (behind NAT)

I want B to be able to listen on any given port, so that A

4条回答
  •  攒了一身酷
    2020-12-09 12:15

    Hole punching is moderately well-understood for UDP communication, but it can be reliably used to set up peer-to-peer TCP streams as well. Here is the well detailed article on both TCP and UDP:

    http://www.brynosaurus.com/pub/net/p2pnat/

提交回复
热议问题