From e1cebcc25370477acba552c8b78cb6fbe1a7b33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 1 Apr 2021 13:22:11 +0200 Subject: [PATCH] web,jvb: add ability to disable web sockets for colibri The fallback is to use SCTP datachannels. This is not recomended. --- docker-compose.yml | 2 ++ jvb/rootfs/defaults/jvb.conf | 3 ++- web/rootfs/defaults/meet.conf | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c41f321..dbb8c62 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,7 @@ services: - ${CONFIG}/web:/config:Z - ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts:Z environment: + - ENABLE_COLIBRI_WEBSOCKET - ENABLE_LETSENCRYPT - ENABLE_HTTP_REDIRECT - ENABLE_HSTS @@ -226,6 +227,7 @@ services: volumes: - ${CONFIG}/jvb:/config:Z environment: + - ENABLE_COLIBRI_WEBSOCKET - DOCKER_HOST_ADDRESS - XMPP_AUTH_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN diff --git a/jvb/rootfs/defaults/jvb.conf b/jvb/rootfs/defaults/jvb.conf index baca26c..42a5925 100644 --- a/jvb/rootfs/defaults/jvb.conf +++ b/jvb/rootfs/defaults/jvb.conf @@ -1,3 +1,4 @@ +{{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }} {{ $JVB_TCP_PORT := .Env.JVB_TCP_PORT | default "4443" }} {{ $JVB_TCP_MAPPED_PORT := .Env.JVB_TCP_MAPPED_PORT | default $JVB_TCP_PORT }} {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}} @@ -36,7 +37,7 @@ videobridge { enabled = true } websockets { - enabled = true + enabled = {{ $ENABLE_COLIBRI_WEBSOCKET }} domain = "{{ $WS_DOMAIN }}" tls = true server-id = "{{ $WS_SERVER_ID }}" diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index b6f89f8..de3ad30 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -1,3 +1,4 @@ +{{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }} {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }} server_name _; @@ -36,6 +37,7 @@ location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|. alias /usr/share/jitsi-meet/$1/$2; } +{{ if $ENABLE_COLIBRI_WEBSOCKET }} # colibri (JVB) websockets location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) { proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args; @@ -44,6 +46,7 @@ location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) { proxy_set_header Connection "upgrade"; tcp_nodelay on; } +{{ end }} # BOSH location = /http-bind {