News for hackers. Stuff that matters.
Re:OBS Merges WebRTC Support by Sean-Der on Saturday June 10, 2023 @05:30PM (#36275331)
Yes WebRTC does require a discovery mechanism. That is where WHIP/Signaling comes into play.

I have a chapter on signaling here https://webrtcforthecurious.com/docs/02-signaling/

I have an example of WebRTC without signaling https://github.com/pion/offline-browser-communication. Each side has to agree on things ahead of time. Useful for security cameras/IoT/LAN stuff though!

Re:OBS Merges WebRTC Support by eyegor on Saturday June 10, 2023 @06:46PM (#36276027)
Since you seem familiar with it, do you think it's possible to run a webrtc connection over http in a modern browser? I tried for a while to make this work but I gave up because it seemed like in js land it tries to use the getUserMedia apis which aren't allowed in an insecure context. The reason why I was trying was to stream audio + data locally from a device that emits its own wifi network (fully offline due to environment restrictions). It seems dumb to have to serve invalid self signed certs just to set up a webrtc ice handshake.
Re:OBS Merges WebRTC Support by Sean-Der on Saturday June 10, 2023 @07:15PM (#36276287)
Unfortunately no.

`localhost` is allowed. Could you reverse port forward the service to localhost? That will get around those restrictions.

Re:OBS Merges WebRTC Support by eyegor on Saturday June 10, 2023 @07:28PM (#36276392)
The service/webserver is running on the device, and clients connect via let's say a cell phone to the devices wifi network. The client talks to the webserver via a wifi network from the device. I don't think there's any way to trick the client into thinking the device is localhost? Maybe some HSTS shenanigans?
Re:OBS Merges WebRTC Support by jhugo on Saturday June 10, 2023 @08:06PM (#36276643)
Self signed certs would be much easier. Or a CA and certs signed by that; since it’s a controlled environment maybe you can install that CA to the trust store on the viewing devices.
Re:OBS Merges WebRTC Support by eyegor on Saturday June 10, 2023 @10:38PM (#36277446)
Unfortunately I don't control all of the clients and I'm using self signed certs now. It's just a hassle having to explain to non cs folks how to click past the unsafe prompt which looks to them like an error.

Meanwhile I can hack together a poor man's webrtc by sending raw packets over websockets and playback works just fine. I just lose all the real benefits of webrtc (robustness, udp vs tcp, etc.). It feels like it should be possible to work around since I don't access anything on the clients, they just play back a stream from the devices.

Re:OBS Merges WebRTC Support by jhugo on Sunday June 11, 2023 @12:52AM (#36278205)
If you’re serving DNS to the clients too, and you’re able to push updates to these devices regularly enough somehow, you can also use real certs with names under some public DNS zone that you control. (Make it resolve to a public IP on the Internet so you can issue/renew the cert, and a private IP on the private network.)

But yeah, one way or another, you need a secure context for WebRTC to work. That’s in the spec, and browsers follow it.

Perhaps in your context it really is nonsense, but how is the browser to know that your network/physical layer is secure?

Re:OBS Merges WebRTC Support by linuxdude314 on Sunday June 11, 2023 @02:03AM (#36278630)
What prevents you from using an actual cert from a trusted CA?