steveseguin / vdo.ninja

VDO.Ninja is a powerful tool that lets you bring remote video feeds into OBS or other studio software via WebRTC.
https://vdo.ninja
Other
2.85k stars 810 forks source link

What prevents air-gapped setup? #861

Closed max-wittig closed 3 years ago

max-wittig commented 3 years ago

In the README, you're talking about that it's not possible to use obsninja without an Internet connection to your handshake server. Why is this the case?

The handshake server's code is currently not available, so basic access to the Internet is still required to use OBS.Ninja even with a private deployment.

What is the handshake server doing? Is it simply a STUN server?

steveseguin commented 3 years ago

It is like a STUN server, yet it's role is to actually transmit the data obtained from the STUN server between the peers. A STUN server's reply defines how to connect to a peer via p2p, but until that info is shared with the other peer, they still cannot connect. The handshake server primarily acts as middleman during this initial setup, though it also acts as a index of streams IDs to ensure they can be found by those looking for them. All connections need to be SSL-encrypted.

image

steveseguin commented 3 years ago

Just for reference,

If you or anyone else is interested in an air-gapped self-hosted option, I put up some server code that's compatible with v17.3 of OBSNinja that should let you do just that.

The code is currently on obs.ninja/beta and also here https://github.com/steveseguin/obsninja/tree/onLiveBox-and-scenes-optimizations. This branch can be run using: https://github.com/steveseguin/websocket_server as the handshake server.

It can also run using piesocket.com as a managed websocket service. In either case, you'll just need to modify index.html of obs.ninja to point to the correct websocket server.

ie: https://github.com/steveseguin/obsninja/blob/f1d60678c4be9c3a1dcd6b803cde7c5d1fc69932/index.html#L1653

session.wss = "wss://wss.contribute.cam:443";
session.pie = true;

This is a beta version, so bugs are possible