Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When creating a WebRTC PeerConnection can I skip the ICE (STUN/TURN) discovery process?

Tags:

webrtc

In my setup, I have a custom server in the cloud handling audio and video so I don't need (and don't want) the whole "where am I and what's my private and public address etc." discovery process. Essentially I want the SDP offer and don't care about the IP-address/port; that offer goes to the server, the server chooses codecs and gets the SRTP key and replies with an SDP answer to the browser which would contain a public address, the codec choice and it's key. Ideally the browser starts sending media to the server and the server simply sends "peer" media back from whence it came (which would tunnel back through any UDP friendly NAT devices).

I know this is technically possible because I already do this with Win32/OSX desktop clients... the question is, is this possible with WebRTC and RTCPeerConnection? I've tried a few configuration types, e.g. {} and { "iceServers": [] } but it still seems to go through discovery gyrations. Are there perhaps other ways to shortcut the process? Thanks!

like image 542
mark Avatar asked Dec 28 '12 16:12

mark


2 Answers

No, you cannot skip the process, since the WebRTC implementation forces the use of ICE and STUN checks, to fix some security problems. So, the current Chrome implementation will force that the STUN checks are made to the ip/ports negotiated in the ICE candidates.

But yes, there are many applications working without this requirement. One day we have to change to better and more secure implementations. The day is now...

like image 135
nakib Avatar answered Oct 04 '22 11:10

nakib


No, you can t skip it in webrtc browsers, but webrtc devices (here your gateway) can simplify the process by only implementing ICE Lite.

like image 38
Dr. Alex Gouaillard Avatar answered Oct 04 '22 13:10

Dr. Alex Gouaillard