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.82k stars 806 forks source link

Hardcoded STUN? #1003

Open tarkhil opened 1 year ago

tarkhil commented 1 year ago

Hello

I've found that failed to use my STUN (no idea why) VDO.Ninja goes to 146.59.44.10

Is that IP hardcoded somewhere? I could not even find it in the code, as well as hostname of it.

steveseguin commented 1 year ago

See https://github.com/steveseguin/vdo.ninja/blob/develop/index.html#L2265

In the index file.

steveseguin commented 1 year ago

If you're blocking Google or are blocked by Google, that might be causing it to not work.

I could host my own stun, but I've never needed to so far.

tarkhil commented 1 year ago

See https://github.com/steveseguin/vdo.ninja/blob/develop/index.html#L2265

In the index file.

Sorry, not. I've added mine STUN, it fails (no idea why) and than for some reason VDO.Ninja resorts to some Poland-based STUN.

steveseguin commented 1 year ago

Are we talking about STUN or TURN ?

I have a polish turn server up; maybe its using that?

steveseguin commented 1 year ago

146.59.44.10 is my polish turn server

tarkhil commented 1 year ago

146.59.44.10 is my polish turn server

Is it hardcoded somewhere?

steveseguin commented 1 year ago

If you don't specify session.configuration in the index file, it will default to using what I have provided. The index file provides an example setup on how to customize a TURN server.

If there is no STUN server, it will default to using a TURN server I believe.

If session.configuration is not set, I'll query for turn server. If that fails, I default to a set of fallback hardcoded domain names as a backup. turn-eu4.vdo.ninja is both an online and offline option.

146.59.44.10 is not hard coded as an IP address; just the doma name.

If that isn't what you're seeing, I can take a closer look, but it would be easier for me to see what you're doing to know where the problem is.

steveseguin commented 1 year ago

If the problem is Google's STUN is blocked, I can include a non Google STUN server as backup additionally.

tarkhil commented 1 year ago

The real problem is probably outside of your scope; my STUN does not work without any reasonable diagnostics. But I'd prefer my videochat to fail without specified servers instead of resorting to some external ones.

steveseguin commented 1 year ago

The default is to use my TURN servers, since most users deploying VDO.Ninja aren't capable of deploying TURN servers themselves. To avoid that, just configure things without any turn servers, but configure things none the less. I think it would be something like this in the index.html file:

session.stunServers = [{ urls: ["stun:stun.l.google.com:19302", "stun:stun4.l.google.com:19302"]}];
session.configuration = {  
  iceServers: session.stunServers,
  sdpSemantics: 'unified-plan'
 };
tarkhil commented 1 year ago

Okay, thanks; maybe you can tell me what's the error "The server stun:gitlab.over.ru:3478 returned an error with code=701:" means and what to do with it?