0

In a webRTC context with two RTCPeerConnection who try to establish a communication both with a browser. I have a TURN server which has a public IP and a client with a private IP.

How can I avoid (in Javascript) the client's browser to start connectivity check with an IP on which he will never have possibility to communicate with?

The purpose is to save useless browser transport request and avoid triggering RTCPeerConnectionIceErrorEvent (like below) on client side.

{
    "address": "192.168.253.x",
    "errorCode": 701,
    "errorText": "TURN allocate request timed out.",
    "path": "[undefined]",
    "port": 62584,
    "type": "icecandidateerror",
    "url": "turn:my.public.ip:3478?transport=udp"
}
Cédric
  • 101
  • But, since this is TURN (not STUN), isn't the whole point of a TURN server to provide relaying for clients that only have private IPs? – u1686_grawity Oct 12 '23 at 12:47
  • @u1686_grawity. Or client who do not have possibility for NATs traversal for incoming traffic ? But perhaps this is the same from a network point of view. – Cédric Oct 12 '23 at 13:18
  • 1
    I mean, TURN is literally the mechanism for NAT traversal in those cases. So it seems normal to me that your internal IPs are sending TURN "allocate requests"... that's how they plan to receive incoming traffic (via the TURN relay). – u1686_grawity Oct 12 '23 at 13:19
  • Ok thank you i understand. In that case, it should be perhaps more appropriate to change my question to : what can be the cause to have a high frequency of TURN allocate request timed out. errors on private IP ? – Cédric Oct 12 '23 at 13:26

0 Answers0