How to connect two clients behind firewalls?

When using an instant messaging application such as Live Messenger or the Google Talk desktop client, computers can transfer files to each other. I can’t say for sure, but I’m sure that the data transferred between computers does not pass through Microsoft or Google IM servers, and two computers with IM software communicate directly with each other. I am interested in how and how this direct relationship between customers is established and how I will implement something similar to myself.

I have experience working with personal networks, but I only understand the client-server relationship, where the server always listens (and the ports are not blocked by the firewall), and the client makes a request to the server whenever data is needed.

+3
source share
5 answers

I used a program called Hamachi , which is a bit like peer-to-peer vpn (virtual-to-network). Then I wrote client server applications as is. It was a quick way to get connectivity over the Internet without the hype required to work with NAT routers.

"", udp. -, , . , A, B . A, B, . , , .

+3

, "pin holing":

UDP, ( UDP, , , ). .

UDP-, . , , , UDP.

+6

, .

  • . .

  • (-) .

, () (-), . , , , .

0

, , VPN , . .

0

, :

EDIT:

- ""

-2

Source: https://habr.com/ru/post/1715545/


All Articles