prosody: add ability to configure external TURN server

Co-authored-by: Thomas Butter <tbutter@gmail.com>
This commit is contained in:
tbutter
2021-08-10 13:57:08 +02:00
committed by GitHub
parent bcae3b19b0
commit 856e414084
3 changed files with 35 additions and 0 deletions

View File

@@ -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 }}