Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authenticated turn servers #13

Open
yocontra opened this issue May 26, 2015 · 11 comments
Open

authenticated turn servers #13

yocontra opened this issue May 26, 2015 · 11 comments

Comments

@yocontra
Copy link

https://gist.github.com/yetithefoot/7592580

the way this library works currently doesn't allow for objects to be put in the turn server file, only strings which means usernames and passwords cant be used

@DamonOehlman
Copy link
Owner

Yeah, that needs to be addressed. I'd still like to use a terse format for defining servers that are an option but I'm not sure what that looks like yet. If you've got any ideas...

@yocontra
Copy link
Author

@DamonOehlman Could use a regular expression to grab the username and password from the string, ie

username:[email protected]:someport

@DamonOehlman
Copy link
Owner

Or just pipe separate them, e.g:

whatever.com:someport|username|password

The 0 part is always the host and perhaps in the event that a turn server has no credentials supplied you can have an authentication process for that particular domain. The rtc.io packages do support asynchronous creation of credentials, although it's not well documented at this stage, but it could definitely work.

@piranna
Copy link

piranna commented May 31, 2020

Isn't this already being fixed with normalice?

@DamonOehlman
Copy link
Owner

@piranna I think you are right, as long as the URLs were formatted appropriately it should definitely work. From looking at the tests in normalice I think I can do better to make things clear about what it does and also update the README so I'll look at doing that and then we can potentially close this issue.

@piranna
Copy link

piranna commented Jun 1, 2020

@piranna I think you are right, as long as the URLs were formatted appropriately it should definitely work. From looking at the tests in normalice I think I can do better to make things clear about what it does and also update the README so I'll look at doing that and then we can potentially close this issue.

That would be great :-)

@DamonOehlman
Copy link
Owner

@piranna So after checking it is true that normalice has some ability to transform a TURN url into a usable object, however, once I dug into it I can see the issue with the TURN servers that are listed in that gist. They both use a colon delimiter in the username (28224511:1379330808) which means the current : separated syntax that normalice uses to parse things falls over.

In truth, normalice is going a bit beyond it's original mission by even doing any of that as the only reason I think I wrote it was to help ease the transition between the { url: 'server' } format and the newer { urls: ['server'] } format (I'm having to remember back a bit now).

I think the best thing I can do, is to make some reasonably simple modifications to freeice and just allow objects to be specified for turn servers. There's some other modifications that I will make while I'm there also which should make it much more "modern webstack friendly" too.

@piranna
Copy link

piranna commented Jun 1, 2020

What about using URL.parse()?

@DamonOehlman
Copy link
Owner

I suspect that will fail also (not sure though). Did you have turn server urls that you were going to provide? If so, without giving the actual urls away is there a format you were hoping to use?

@DamonOehlman
Copy link
Owner

As an aside here's another gist with a big list of servers:

https://gist.github.com/sagivo/3a4b2f2c7ac6e1b5267c2f1f59ac6c6b

@piranna
Copy link

piranna commented Jun 1, 2020

I suspect that will fail also (not sure though). Did you have turn server urls that you were going to provide? If so, without giving the actual urls away is there a format you were hoping to use?

URL.parse() can identify both usernames, passwords and schemas, so it should work. Anyway, schemas are only turn:, stun: and turns: (this one currently not supported), so it's easy to identify them...

As an aside here's another gist with a big list of servers:

This is HUGE! :-D Would love to have them inside freeice. Maybe a tool that checks their availability nightly would be needed thought, to don't have them out of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants