For backwards compatibility we return the first in list TURN server directly. This allows clients which do not implement any selection still use TURN and lets the TURN service control which one it should be (first in list is used).
Use this script for TURN testing. Make sure Spreed WebRTC has a TURN server configured which also supports tcp. Make a call and check chrome://webrtc-internals or about:webrtc to see if TURN is actually in use (also make sure that audio and video is coming through in both directions).
https://github.com/strukturag/docker-webrtc-turnserver/issues/5
To provide peer to peer support for users with a firewall, a TURN
service might be required. Not everyone can/wants to setup a self-hosted
TURN server. This change adds support to consume a remote TURN service
which usually requires authentication. Spreed WebRTC received TURN
credentials using this service in regular intervals and provides them to
all Spreed WebRTC sessions.
If the remote TURN service provides multiple zones and a GEO location
endpoint, the web client will also directly connect to that TURN service
GEO endpoint to let the TURN service select preferred zones based on the
clients information.
The advanced settings provide a way to control the TURN service zone
directly and to disable the client side GEO call. By default the
selection is auto if the TURN service provides a GEO endpoint. If no
such endpoint is required, the zone with the highest priority is used by
default (as sent by the TURN credentials service).
To reduce the Docker image size a seperate build Dockerfile is
introduced. This Docker image produces a tarball of the released and
compiled software which can when be piped into the Dockerfile.run build
process. The result is a minimal image only containing Spreed WebRTC and
the gear to run OpenSSL.
First create the builder image:
```
docker build -t spreed-webrtc-builder -f Dockerfile.build .
```
Next run the builder container, piping its output into the creation of
the runner container:
```
docker run --rm spreed-webrtc-builder | docker build -t spreed-webrtc -f
Dockerfile.run -
```
Afterwards run the container like this:
```
docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 \
-v `pwd`:/srv/extra -i -t spreed-webrtc
```
To avoid issues with existing environment variables while building Go
sources the Makefile now removes existing GOROOT and GOBIN environment
variables. This should fix issues like #324 where the environment
already contains some sort of Go settings.