I have my client A and client B connected to each other. However I wish to disconnect my client A and connect it to client C. How can I achieve that?
That isn't possible. Why not create a new PeerConnection and negotiate the session?
You could maybe find a hacky way to make it work with a ICE + DTLS Restart. It would be undefined behavior/not supported by all clients.
Related
In my case, I have a webrct based web app that supports multi-parti video chat and has STUN and TURN servers configured. The connections are done in a mesh way (peer to peer) What happens when some of the users involved in the video chat need to establish the connection via TURN? Do all of the users start to use TURN? What if I'm the user that's behind a NAT? Does that mean that all connections established with me are using TURN?
Connections are peer to peer, so if one connection uses TURN then it doesn't affect other peer to peer connections.
If the user is behind a NAT, he may not need TURN in some cases: all depends on the type of the NAT.
i have a problem. I've developed a web-app using WebRtc for one-to-one videocall via browser using WebRtc with signalling server on node js (listening e.g. on 8181 port).
Now i would implement MITM attack. I was thinking that, wheen Peer_1 should invoke two rtc peer connection, one for the second peer (Peer_2), one to the MITM. The same thing for the second peer.
Now, i was thinking that signalling server needs to listen on another port, for each rtc peer connection received from the two peers (e.g. 8282 for Peer_1 and 8383 for Peer_2).
Am i right? I think that because signalling server's implementation is to one-to-one communication.
In this way, signalling server on port 8181 allows end-to-end communication for Peer_1 and Peer_2, on 8282 there is the signalling path for Peer_1 and the MITM, and on 8383 for MITM and Peer_2.
Am i right or not? Thanks for the support.
Man in the middle refers to interception during transmission, which WebRTC itself is secured against using DTLS and key exchange, so the weak point is usually the signaling server chosen by an application instead.
But what you describe however sounds like Man on both ends. You have to trust the service (the server) to guarantee whom you're being connected to. If that server is compromised, or either client is compromised - say by injection - then there's no guarantee whom you're talking to, since a client can easily forward a transmission to another party.
I'm developing a web application that want to share the posts that one user posted in one topic argument via webRTC.
The problem is that webRTC allow only one-to-one peer connection.
What can i do for solve this problem using webRTC?
I need that my information is transfered broadcast to the other peer that are connected in the same room.
For this you need some signaling server like easyrtc, which packages some really awesome functionalities. One of those is multy-party videocalls.
If you want to read more about, and see some cool demos check https://easyrtc.com/ and https://demo.easyrtc.com/demos/
After you establish the connection via signalling server, you can open the DataChannel and make the transfer that you said..
I am trying to get a browser client to connect with my C++ linux application using WebRTC. So my environment is not the typical triangle WebRTC where 2 browsers setup a WebRTC call thru a server. Instead, the browser client side is typical, but my application is acting as the server and the remote client, so it does the signalling and also streams the SRTP media using gstreamer.
I am successful up to a point. I have successfully exchanged the ice candidates and the offer/answer SDP exchange is also successful. The browser ICE connection state successfully goes to "checking" and at that point I am stuck.
Question: Is the server or remote browser involved in the ice checking operations? That is, does the browser do the ICE checking with the STUN server or with the actual candidate address from the remote end. That would then imply that my C++ application has to be involved in that checking process.
Thanks,
-Andres
your server needs to respond to STUN binding requests at least which are sent as part of ICE.
If your server always has a public IP, using ice-lite (see RFC 5245) will make your life a lot easier.
I read that WebRTC uses relay servers, if the direct peer connection doesn't work because of firewalls.
Is there a way to check, if this is the case?
When you establishing WebRTC connection, you set STUN and/or TURN for a web browser to use. If you informed a web browser with the both options, web browser will start trying to use STUN first. Then, in case of unsuccess it will try to use TURN.
The 'relay server' is a TURN-server.
As I know, there is no standard way to know out which option a web browser decided to use: STUN or TURN.
In other hand, if you're the owner of TURN server, you can see whether web client does use it or not, and then send this information to the client.
UPDATED
This is my code: https://github.com/fycth/webrtcexample/blob/master/www/js/rtc_lib.js
You can see there I use just STUN server, so it is p2p or nothing, and no relay.
In chrome. go to chrome://webrtc-internals, go to succeeded connection-googCandidate pair(in black letters) check if googLocalcandidatetype is relay, then webrtc uses relay connection . If googLocalcandidatetype is local, then it uses peer to peer connection
In firefox, go to about:webrtc, if the succeeded connection contains any candidate as relayed-udp, then webrtc uses relay connection