News for hackers. Stuff that matters.
Re:How Discord Handles Two and Half Million Concurrent Voice... by hobo_mark on Monday September 10, 2018 @03:13PM (#17954255)
Could I avoid requiring a central server, and still use webrtc, if the two peers I want to connect are in the same lan?
Re:How Discord Handles Two and Half Million Concurrent Voice... by dep_b on Monday September 10, 2018 @04:12PM (#17954805)
Yes: https://github.com/LucasVanDongen/WebRTC-Local-Loop-iOS

Based on: https://webrtc.github.io/samples/src/content/peerconnection/...

You will need to know where the other peer lives. Which is why they expect you to have a discovery service. But typing in local IP's should work for internal networks. The hardest part is getting through NAT and firewalls and that's not a problem on your own LAN.

Re:How Discord Handles Two and Half Million Concurrent Voice... by api on Monday September 10, 2018 @03:18PM (#17954305)
I think this is possible, but I'm not sure about the details. I think their IPs need to be obtained somehow though. I don't think you can use things like mDNS from web pages without a plugin.
Re:How Discord Handles Two and Half Million Concurrent Voice... by singularity2001 on Monday September 10, 2018 @03:35PM (#17954461)
would ip guessing work? 192.168.. … ?
Re:How Discord Handles Two and Half Million Concurrent Voice... by api on Monday September 10, 2018 @03:40PM (#17954507)
It would flood the network with probes and take quite a while.
Re:How Discord Handles Two and Half Million Concurrent Voice... by mcdevilkiller on Tuesday September 11, 2018 @04:43AM (#17958086)
Maybe embedding nmap with the electron app to search for active bodes, then probeing. Requires some C or C++ knowledge though.
Re:How Discord Handles Two and Half Million Concurrent Voice... by singularity2001 on Tuesday September 11, 2018 @08:32AM (#17959092)
can't electron js do local pings?
Re:How Discord Handles Two and Half Million Concurrent Voice... by matthewmacleod on Monday September 10, 2018 @03:43PM (#17954534)
You still ultimately need some channel to set up that initial P2P connection. This allows the peers to share the IP addresses at which they’re accessible, as well as the formats and codecs they each support.

There’s nothing to stop you doing this through broadcast messages on a local network, though I’m not aware of any way that could be done from within a browser. You could extract the SDP and ICE messages from the browser environment and handle that in Node though, if you were using Electron or something.

Re:How Discord Handles Two and Half Million Concurrent Voice... by hobo_mark on Monday September 10, 2018 @05:29PM (#17955374)
Thanks everyone, what I essentially want to do is link a phone (my app) with a laptop (running a decent browser) by showing a QR code on the latter, and establish a data channel (not voice or video).