Building a signaling server using y-webrtc

Dear Sir,
We are attempting to build a signaling server using y-webrtc.
In the code you provided, I would like to know how sensitive informations (WebRTC connection info, shared data - “ICECANDIDATE”, “SDP”, “OFFER”, and “ANSWER”) are implemented to build the signaling server (etc… we can’t see functions like ‘RTCPeerConnection.createOffer()’).
Is Peer() of peer.js doing role of real “SIGNALING SERVER”(=== connecting peer to peer at network level)??

I’d appreciate it if you could answer.

and we are very very thank you for your answer of “how to save save y-doc in mongoDB” !!

Hi @jinh0303,

y-webrtc indeed uses simple-peer to generate WebRTC messages. The provided signaling server is basically a pubsub server and doesn’t read the supplied messages (and it shouldn’t have to, for privacy reasons). Another feature of y-webrtc is that you can encrypt the signaling data. Only clients that know the data can decrypt the sensitive information and connect to each other. This is possible because the server doesn’t need to decode the messages (except the information about the name of the document they are collaborating on).

1 Like

We are very grateful for your kind reply.
Your answer was really helpful.
While analyzing the y-webrtc module, I felt how great you and your colleagues were. I’m learning a lot in the process.
If I don’t know anything, I’ll think about it and ask.
Thank you, sir!

1 Like