Web P2P/WebRTC serverless signalling: is it possible to signal successfully without generating a response?

Viewed 2447

My goal is to create a p2p serverless web application and I'm not completely clear on the possibilities yet. I figured there was a need for peer discovery and that there would be NAT issues. After that, I searched on Google and read a lot of articles, I came to the conclusion that WebRTC is my only bet. However, there is a thing that I don't understand:

Why is it not possible to create a p2p connection through simply sending a sharable link with connection info in the GET parameters of the URL that only contains the offer? If Alice sends her public IP (and whatever else is in the offer) to Bob via example.com/?info=<IP_ADDRESS>&info2=<OTHER_STUFF>, then why can't Bob immediately connect to Alice? Why does Bob need to send a response to a signalling server?

This answer seems to suggest it's not possible: Establishing WebRTC peer connection

But I don't get why, there should be enough info. Is it a trust issue?

Is it possible with any technology (i.e. not only WebRTC) to create a p2p application in which only Alice sends her info and Bob can respond back to Alice by using the IP-address of Alice?

1 Answers

I implemented the following to get p2p working https://github.com/chr15m/bugout

He markets it as server in the browser, but it's also for peers in the browser, or clients, or any code that wants to communicate to another browser for whatever reason.

How it works: it uses open webtorrent trackers to create a peer discovery mechanism. By doing this, one does not need to implement their own signal server as they're hitching a ride from open-source infrastructure. Though, he also implemented his own signaling server. You also get STUN servers for free by doing this.

Related