Описание тега hole-punching

Hole punching is the process of taking advantage of the standard way of implementing NAT to allow direct connection between computers in private networks.

The process starts as normal proxy - two devices connect to the same public server:

image description

The data flows through public server. The green circles represent the socket connections between devices, the blue line is the flow of data.

Now what it the server sends socket A to device B and vice versa?

image description

Suddenly, both devices have each other's "address" and can send any information to each other:

image description