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

Update docker commands to utilize coturn properly #134

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

PMohanJ
Copy link
Contributor

@PMohanJ PMohanJ commented Jan 11, 2024

As the coturn is included in the desktop itself, when deploying the container in a VM rather than local env, the TURN_HOST variable is supposed to set to the host address of the machine, else the default value localhost is applied which in these scenarios fails the webrtc connection.

Also when setting up the coturn server with the provided docker command it requires the realm flag/argument to set for the TURN capability to work https://github.com/coturn/coturn/blob/master/docker/coturn/turnserver.conf#L352.

This can be verified by doing an ICETEST.

docker run -d -p 3478:3478 -p 3478:3478/udp -p 49160-49200:49160-49200/udp coturn/coturn -n --min-port=49160 --max-port=49200 --lt-cred-mech --user=yourusername:yourpassword
docker run -d -p 3478:3478 -p 3478:3478/udp -p 49160-49200:49160-49200/udp coturn/coturn -n --min-port=49160 --max-port=49200 --lt-cred-mech --user=yourusername:yourpassword --realm=example.com

Run the both containers and test them for ICE candidates at the given site and check for the relay candidates. The coturn without the realm flag doesn't return relay ICE candidate.

PMohanJ and others added 3 commits January 11, 2024 17:17
As the coturn is embedded into the selkies desktop, the host address is required for
the client in order to utilize coturn server.
The realm argument is necessay for the coturn in order to support TURN capability
@ehfd
Copy link
Member

ehfd commented Jan 12, 2024

I acknowledge that both may be an issue. But, for the TURN_HOST, it would be a better idea to identify the IP from within the example container. There's checkip.amazonaws.com and alternatives that are typically used in this case.

@PMohanJ
Copy link
Contributor Author

PMohanJ commented Jan 12, 2024

I tried with checkip.amazonaws.com it's returning the Public IP of the VM, but in case of VPN enabled VMs it's not working because the client can only access that VM with the private IP but not Public IP (correct me if I'm wrong, latter is my scenario here and it's not working for me).

@ehfd
Copy link
Member

ehfd commented Jan 12, 2024

In that case, it would be possible to add that detail as a note and default to using automatic IP resolution.

@PMohanJ
Copy link
Contributor Author

PMohanJ commented Jan 12, 2024

Sounds good.

@ehfd
Copy link
Member

ehfd commented Jan 12, 2024

@PMohanJ Care to try making that change? I'll make the final edits tomorrow.

@PMohanJ
Copy link
Contributor Author

PMohanJ commented Jan 12, 2024

Ok. I'll update that in a few minutes.

@PMohanJ
Copy link
Contributor Author

PMohanJ commented Feb 1, 2024

@ehfd Any review on this?

@ehfd
Copy link
Member

ehfd commented Feb 1, 2024

Give me a bit of time.
Thank you for your patience.

@ehfd ehfd merged commit 29bdfad into selkies-project:main Feb 2, 2024
1 check passed
@ehfd
Copy link
Member

ehfd commented Feb 2, 2024

Thank you.

@PMohanJ PMohanJ deleted the coturn branch February 13, 2024 06:02
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

Successfully merging this pull request may close these issues.

None yet

2 participants