prosody: add ability to configure external TURN server

Co-authored-by: Thomas Butter <tbutter@gmail.com>
pull/144/head
tbutter 3 years ago committed by GitHub
parent bcae3b19b0
commit 856e414084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      docker-compose.yml
  2. 7
      env.example
  3. 23
      prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua

@ -172,6 +172,11 @@ services:
- JWT_TOKEN_AUTH_MODULE
- LOG_LEVEL
- PUBLIC_URL
- TURN_CREDENTIALS
- TURN_HOST
- TURNS_HOST
- TURN_PORT
- TURNS_PORT
- TZ
networks:
meet.jitsi:

@ -354,6 +354,13 @@ JIBRI_STRIP_DOMAIN_JID=muc
# Directory for logs inside Jibri container
JIBRI_LOGS_DIR=/config/logs
# Configure an external TURN server
# TURN_CREDENTIALS="secret"
# TURN_HOST=turnserver.example.com
# TURN_PORT=443
# TURNS_HOST=turnserver.example.com
# TURNS_PORT=443
# Disable HTTPS: handle TLS connections outside of this setup
#DISABLE_HTTPS=1

@ -24,6 +24,26 @@ http_default_host = "{{ .Env.XMPP_DOMAIN }}"
{{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
{{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
{{ $TURN_PORT := .Env.TURN_PORT | default "443" }}
{{ $TURNS_PORT := .Env.TURNS_PORT | default "443" }}
{{ if .Env.TURN_CREDENTIALS }}
external_service_secret = "{{.Env.TURN_CREDENTIALS}}";
{{ end }}
{{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
external_services = {
{{ if .Env.TURN_HOST }}
{ type = "turn", host = "{{ .Env.TURN_HOST }}", port = {{ $TURN_PORT }}, transport = "tcp", secret = true, ttl = 86400, algorithm = "turn" }
{{ end }}
{{ if and .Env.TURN_HOST .Env.TURNS_HOST }}
,
{{ end }}
{{ if .Env.TURNS_HOST }}
{ type = "turns", host = "{{ .Env.TURNS_HOST }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = 86400, algorithm = "turn" }
{{ end }}
};
{{ end }}
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }}
asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
@ -93,6 +113,9 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}"
"ping";
"speakerstats";
"conference_duration";
{{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
"external_services";
{{ end }}
{{ if $ENABLE_LOBBY }}
"muc_lobby_rooms";
{{ end }}

Loading…
Cancel
Save