-
Notifications
You must be signed in to change notification settings - Fork 547
Add ability to customize stun/turn server #261
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
base: main
Are you sure you want to change the base?
Conversation
Add function for using TURN_CRED
Add stun variables: STUN_HOST/PORT; add turn variables: TURN_HOST/TRANS/CRED/PORT
Create an example file which will need to be renamed to `.env`
If coturn is not enabled, just use stun server fix
What about read a fully customized ice server json from env. We can add internal coturn configuation after decoding if needed. |
I like the idea, but for my use case which is long term cred, the username and password are generated after you upload a file and press start. So you couldn't pass in a full ICE config that had any LTC attached to it. |
You are right. When customizing the config for the TURN server that filepizza can interact with, these fields are useful. And I agree that setting credentials through Redis is much safer. But in my scenario, I need to use TURN servers in various geolocations. I can use virtual networking to protect the Redis connection across servers, but it seems like interacting with more than one TURN server is currently not supported. Using a variable to input JSON can make the configuration more concise. At the same time, we can use something like [
{
"urls": "turn:xx.xx.com:3478",
"username": "${{username}}",
"credential": "${{password}}"
},
{
"urls": "turn:xx.xx2.com:3478",
"username": "StaticUsername",
"credential": "StaticPassword"
},
{
"urls": "stun:stun.l.google.com:19302"
}
] |
@Mmx233 If you have time to look into it, I'd say go for it. In general though, I don't think it is wise to use more than one turn server as it can cause performance issues. I don't remember where I read that so maybe it is old info. |
This PR is for user's who already have a working turn server setup and enables the ability to customize the stun/turn servers through environmental variables. Resolves #241
New variables
stun.l.google.com
19302
127.0.0.1
both
,udp
, ortcp
. Defaults toboth
3478
5349