coturn / coturn

coturn TURN server project
Other
11.31k stars 2.01k forks source link

[Questions] - [help]: how to config turnserver.conf for this use case? #1271

Open walteroa2023 opened 1 year ago

walteroa2023 commented 1 year ago

Hi experts, Im newbie in WebRTC, but as far as I understood, in order to communicate 2 agents in different networks I should use coturn, as suggested by pairdrop (kinda airdrop, but multiplatform http://github.com/schlagmichdoch/PairDrop).

Now, the case is:

Traffic Flows: (need to communicate to each others)

1) Agent A and Agent C, both in the same internal network, no NAT, no need to use TURN/STUN. [green agents] 2) Agent A (on internal network) and Agent B (on mobile network), so in this case TURN/STUN has to be used to enable peer to peer flow. [green agent vs. pink agent]

pairdrop_use_case

My questions: (coming from turnserver.conf)

Sorry, too much questions, but no idea how to start with turnserver.conf ...

Thx a lot in advance!

eakraly commented 1 year ago

Hi @walteroa2023

Looking at your network configuration it looks like putting your TURN server in the same network as one of the clients defeats the purpose of having TURN. The idea of having TURN in between 2 clients is when they cannot reach each other directly (because NAT) but they can reach out to some common network (usually public internet) where you put TURN server which allows connection between the clients. When you put your TURN server in the same network as pairdrop you basically stay with the same issue - your AgentB not able to reach your internal network.

Now to your questions (most of them easily answered by looking into README.turnserver):