K
K
Konstantin2021-07-30 11:57:02
Computer networks
Konstantin, 2021-07-30 11:57:02

How does a peer-to-peer connection work if both people are on internal ip (behind NAT)?

Hello.
In the settings of the desktop client of the telegram messenger, there is an option "Use peer-to-peer for calls".
If both people are sitting on internal ip (behind NAT), then how will the connection take place?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
res2001, 2021-07-30
@webmaster

Either they make holes in their NAT using UPnP, or they use UDP for communication, and the coordinates of the second side are received from a common server. Approximately according to the same scheme, VoIP works behind NAT (see the STUN protocol).

A
Alexey Dmitriev, 2021-07-30
@SignFinder

The problem with NAT is in creating\opening a connection (you can't reach the client behind NAT from the outside).
Most likely, the call is created through the Telegram server, and then two clients agree among themselves and already work directly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question