From ad5625bb0990ee20f599d0e73eac06df115e2fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 2 Oct 2020 16:40:04 +0200 Subject: [PATCH] jvb: switch to WebSocket based bridge channels --- docker-compose.yml | 4 +++- env.example | 2 +- jvb/rootfs/defaults/sip-communicator.properties | 7 +++++++ web/rootfs/defaults/meet.conf | 9 +++++++++ web/rootfs/defaults/settings-config.js | 5 ++--- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 709dd6f..de2ade8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,6 @@ services: - DROPBOX_REDIRECT_URI - ENABLE_AUDIO_PROCESSING - ENABLE_AUTH - - ENABLE_BRIDGE_CHANNEL - ENABLE_CALENDAR - ENABLE_FILE_RECORDING_SERVICE - ENABLE_FILE_RECORDING_SERVICE_SHARING @@ -209,11 +208,14 @@ services: - JVB_TCP_PORT - JVB_STUN_SERVERS - JVB_ENABLE_APIS + - PUBLIC_URL - TZ depends_on: - prosody networks: meet.jitsi: + aliases: + - jvb.meet.jitsi # Custom network so all services can communicate using a FQDN networks: diff --git a/env.example b/env.example index 0394cec..9da2c05 100644 --- a/env.example +++ b/env.example @@ -42,7 +42,7 @@ HTTPS_PORT=8443 # System time zone TZ=UTC -# Public URL for the web service +# Public URL for the web service (required) #PUBLIC_URL=https://meet.example.com # IP address of the Docker host diff --git a/jvb/rootfs/defaults/sip-communicator.properties b/jvb/rootfs/defaults/sip-communicator.properties index 173a21b..9f3300f 100644 --- a/jvb/rootfs/defaults/sip-communicator.properties +++ b/jvb/rootfs/defaults/sip-communicator.properties @@ -21,3 +21,10 @@ org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true org.jitsi.videobridge.ENABLE_STATISTICS=true org.jitsi.videobridge.STATISTICS_TRANSPORT=muc org.jitsi.videobridge.STATISTICS_INTERVAL=5000 + +{{ $WS_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}} + +org.jitsi.videobridge.rest.COLIBRI_WS_DISABLE=false +org.jitsi.videobridge.rest.jetty.port=9090 +org.jitsi.videobridge.rest.COLIBRI_WS_DOMAIN={{ $WS_DOMAIN }} +org.jitsi.videobridge.rest.COLIBRI_WS_TLS=true diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index 7f02958..bda34d6 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -34,6 +34,15 @@ location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|. alias /usr/share/jitsi-meet/$1/$2; } +# colibri (JVB) websockets +location ~ ^/colibri-ws/default-id/(.*) { + proxy_pass http://jvb.meet.jitsi:9090/colibri-ws/default-id/$1$is_args$args; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + tcp_nodelay on; +} + # BOSH location = /http-bind { proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind; diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js index 42f520b..19c863a 100644 --- a/web/rootfs/defaults/settings-config.js +++ b/web/rootfs/defaults/settings-config.js @@ -1,7 +1,6 @@ {{ $DEPLOYMENTINFO_USERREGION := .Env.DEPLOYMENTINFO_USERREGION | default "" -}} -{{ $BRIDGE_CHANNEL := .Env.BRIDGE_CHANNEL | default "datachannel" -}} +{{ $BRIDGE_CHANNEL := .Env.BRIDGE_CHANNEL | default "websocket" -}} {{ $ENABLE_AUDIO_PROCESSING := .Env.ENABLE_AUDIO_PROCESSING | default "true" | toBool -}} -{{ $ENABLE_BRIDGE_CHANNEL := .Env.ENABLE_BRIDGE_CHANNEL | default "true" -}} {{ $ENABLE_CALENDAR := .Env.ENABLE_CALENDAR | default "false" | toBool -}} {{ $ENABLE_FILE_RECORDING_SERVICE := .Env.ENABLE_FILE_RECORDING_SERVICE | default "false" | toBool -}} {{ $ENABLE_FILE_RECORDING_SERVICE_SHARING := .Env.ENABLE_FILE_RECORDING_SERVICE_SHARING | default "false" | toBool -}} @@ -230,7 +229,7 @@ config.enableLipSync = {{ $ENABLE_LIPSYNC }}; config.enableRemb = {{ $ENABLE_REMB }}; config.enableTcc = {{ $ENABLE_TCC }}; -config.openBridgeChannel = '{{ $ENABLE_BRIDGE_CHANNEL }}'; +config.openBridgeChannel = '{{ $BRIDGE_CHANNEL }}'; // Enable IPv6 support. config.useIPv6 = {{ $ENABLE_IPV6 }};