Browse Source

feat: Enable bridge websockets by default for new installs (#7781)

* feat: Drops multiplexing support by default.

* fix: Fix purge of jitsi-meet-prosody.

Clean the accounts when there is a - in the domain name.
Removes the certificate so reinstall will not cause problems.

* feat: Enables bridge websockets by default.

* fix: External-ip conflicts with denied-peer-ip.

In cases where the bridge and coturn are on the same machine and the local address is any of the networks from denied-peer-ip, coturn is not using its public address to probe it and communication fails as the other address is deneid.

* squash: Fix a comment.
master
Дамян Минков 4 years ago
parent
commit
93f4098dc0
No account linked to committer's email address

+ 1
- 0
config.js View File

@@ -337,6 +337,7 @@ var config = {
337 337
     // 'datachannel'), undefined (treat it as 'datachannel') and false (don't
338 338
     // open any channel).
339 339
     // openBridgeChannel: true,
340
+    openBridgeChannel: 'websocket',
340 341
 
341 342
 
342 343
     // UI

+ 6
- 2
debian/jitsi-meet-prosody.postrm View File

@@ -45,8 +45,12 @@ case "$1" in
45 45
             rm -rf /var/lib/prosody/$JICOFO_AUTH_DOMAIN.*
46 46
             rm -rf /var/lib/prosody/$JVB_HOSTNAME.*
47 47
 
48
-            # clean created users
49
-            rm -rf /var/lib/prosody/`echo $JICOFO_AUTH_DOMAIN | sed -e "s/\./%2e/g"`
48
+            # clean created users, replace '.' with '%2e', replace '-' with '%2d'
49
+            rm -rf /var/lib/prosody/`echo $JICOFO_AUTH_DOMAIN | sed -e "s/\./%2e/g"| sed -e "s/-/%2d/g"`
50
+
51
+            # clean the prosody cert from the trust store
52
+            rm -rf /usr/local/share/ca-certificates/$JICOFO_AUTH_DOMAIN.*
53
+            update-ca-certificates -f
50 54
         fi
51 55
 
52 56
         # Clear the debconf variable

+ 0
- 1
debian/jitsi-meet-turnserver.install View File

@@ -1,3 +1,2 @@
1 1
 doc/debian/jitsi-meet-turn/turnserver.conf          /usr/share/jitsi-meet-turnserver/
2
-doc/debian/jitsi-meet/jitsi-meet.conf               /usr/share/jitsi-meet-turnserver/
3 2
 doc/debian/jitsi-meet-turn/coturn-certbot-deploy.sh /usr/share/jitsi-meet-turnserver/

+ 8
- 42
debian/jitsi-meet-turnserver.postinst View File

@@ -36,26 +36,6 @@ case "$1" in
36 36
         NGINX_CONFIG="/etc/nginx/sites-available/$JVB_HOSTNAME.conf"
37 37
         JITSI_MEET_CONFIG="/etc/jitsi/meet/$JVB_HOSTNAME-config.js"
38 38
 
39
-        NGINX_SITES_ENABLED="/etc/nginx/sites-enabled/"
40
-        NGINX_CONFIG_ENABLED="${NGINX_SITES_ENABLED}${JVB_HOSTNAME}.conf"
41
-        NGINX_MULTIPLEXING="true"
42
-        for site in ${NGINX_SITES_ENABLED}*; do
43
-            # if it is not a file continue
44
-            [ -f "${site}" ] || continue
45
-            # if it is our config skip
46
-            [ "${site}" != "${NGINX_CONFIG_ENABLED}" ] || continue
47
-            # check whether other enabled hosts has listen 443
48
-            if cat ${site} | grep -v "^[[:space:]]*#" | grep listen | grep -q "^.*[[:space:]:]443[;[:space:]].*" ; then
49
-                # nothing to do
50
-                echo "------------------------------------------------"
51
-                echo ""
52
-                echo "turnserver is listening on tcp 5349 as other nginx sites use port 443"
53
-                echo ""
54
-                echo "------------------------------------------------"
55
-                NGINX_MULTIPLEXING="false"
56
-            fi
57
-        done
58
-
59 39
         # if there was a turn config backup it so we can configure
60 40
         # we cannot recognize at the moment is this a user config or default config when installing coturn
61 41
         if [[ -f $TURN_CONFIG ]] && ! grep -q "jitsi-meet coturn config" "$TURN_CONFIG" ; then
@@ -133,19 +113,9 @@ denied-peer-ip=240.0.0.0-255.255.255.255" >> $TURN_CONFIG
133 113
         TURN_SECRET="$RET"
134 114
 
135 115
         # no turn config exists, lt's copy template and fill it in
136
-        PUBLIC_IP=$(dig -4 +short myip.opendns.com a @resolver1.opendns.com) || true
137
-        if [ -z "$PUBLIC_IP" ] ; then
138
-            PUBLIC_IP="127.0.0.1"
139
-            echo "------------------------------------------------"
140
-            echo "Warning! Could not resolve your external ip address! Error:^"
141
-            echo "Your turn server will not work till you edit your $TURN_CONFIG config file."
142
-            echo "You need to set your external ip address in external-ip and restart coturn service."
143
-            echo "------------------------------------------------"
144
-        fi
145 116
         cp /usr/share/jitsi-meet-turnserver/turnserver.conf $TURN_CONFIG
146 117
         sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $TURN_CONFIG
147 118
         sed -i "s/__turnSecret__/$TURN_SECRET/g" $TURN_CONFIG
148
-        sed -i "s/__external_ip_address__/$PUBLIC_IP/g" $TURN_CONFIG
149 119
 
150 120
         # SSL for nginx
151 121
         db_get jitsi-meet/cert-choice
@@ -170,18 +140,14 @@ denied-peer-ip=240.0.0.0-255.255.255.255" >> $TURN_CONFIG
170 140
         invoke-rc.d coturn restart || true
171 141
 
172 142
         NGINX_STREAM_CONFIG="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
173
-        if [ $NGINX_MULTIPLEXING = "true" ] && [ ! -f $NGINX_STREAM_CONFIG ] && [ -f $NGINX_CONFIG ] ; then
174
-            ln -s /usr/share/jitsi-meet-turnserver/jitsi-meet.conf $NGINX_STREAM_CONFIG
175
-            sed -i "s/listen 443 ssl/listen 4444 ssl http2/g" $NGINX_CONFIG
176
-            sed -i "s/listen \[\:\:\]\:443 ssl/listen \[\:\:\]\:4444 ssl http2/g" $NGINX_CONFIG
177
-            invoke-rc.d nginx reload || true
178
-        else
179
-            PROSODY_HOST_CONFIG="/etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua"
180
-            if [ -f $PROSODY_HOST_CONFIG ] ; then
181
-                # If we are not multiplexing we need to change the port in prosody config
182
-                sed -i 's/"443"/"5349"/g' $PROSODY_HOST_CONFIG
183
-                invoke-rc.d prosody restart || true
184
-            fi
143
+        if [ -f $NGINX_STREAM_CONFIG ] ; then
144
+            echo "------------------------------------------------"
145
+            echo ""
146
+            echo "You have multiplexing enabled, it is recommended to disable it and migrate to using websockets for the bridge channel."
147
+            echo "The support for sctp data channels is deprecated and will be dropped at some point."
148
+            echo "How to do it at: https://jitsi.org/multiplexing-to-bridge-ws-howto"
149
+            echo ""
150
+            echo "------------------------------------------------"
185 151
         fi
186 152
 
187 153
         # Enable turn server in config.js

+ 0
- 2
debian/jitsi-meet-turnserver.postrm View File

@@ -24,7 +24,6 @@ set -e
24 24
 
25 25
 case "$1" in
26 26
     remove)
27
-        rm -rf /etc/nginx/modules-enabled/60-jitsi-meet.conf
28 27
         if [ -x "/etc/init.d/nginx" ]; then
29 28
             invoke-rc.d nginx reload || true
30 29
         fi
@@ -33,7 +32,6 @@ case "$1" in
33 32
         fi
34 33
     ;;
35 34
     purge)
36
-        rm -rf /etc/nginx/modules-enabled/60-jitsi-meet.conf
37 35
         rm -rf /etc/turnserver.conf
38 36
         if [ -x "/etc/init.d/nginx" ]; then
39 37
             invoke-rc.d nginx reload || true

+ 1
- 1
doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example View File

@@ -8,7 +8,7 @@ turncredentials_secret = "__turnSecret__";
8 8
 turncredentials = {
9 9
   { type = "stun", host = "jitmeet.example.com", port = "3478" },
10 10
   { type = "turn", host = "jitmeet.example.com", port = "3478", transport = "udp" },
11
-  { type = "turns", host = "jitmeet.example.com", port = "443", transport = "tcp" }
11
+  { type = "turns", host = "jitmeet.example.com", port = "5349", transport = "tcp" }
12 12
 };
13 13
 
14 14
 cross_domain_bosh = false;

+ 0
- 1
doc/debian/jitsi-meet-turn/turnserver.conf View File

@@ -12,7 +12,6 @@ no-tcp-relay
12 12
 no-tcp
13 13
 listening-port=3478
14 14
 tls-listening-port=5349
15
-external-ip=__external_ip_address__
16 15
 no-tlsv1
17 16
 no-tlsv1_1
18 17
 # https://ssl-config.mozilla.org/#server=haproxy&version=2.1&config=intermediate&openssl=1.1.0g&guideline=5.4

+ 0
- 30
doc/debian/jitsi-meet/jitsi-meet.conf View File

@@ -1,30 +0,0 @@
1
-# this is jitsi-meet nginx module configuration
2
-# this forward all http traffic to the nginx virtual host port
3
-# and the rest to the turn server
4
-
5
-stream {
6
-    upstream web {
7
-        server 127.0.0.1:4444;
8
-    }
9
-    upstream turn {
10
-        server 127.0.0.1:5349;
11
-    }
12
-    # since 1.13.10
13
-    map $ssl_preread_alpn_protocols $upstream {
14
-        ~\bh2\b         web;
15
-        ~\bhttp/1\.     web;
16
-        default         turn;
17
-    }
18
-
19
-    server {
20
-        listen 443;
21
-        listen [::]:443;
22
-
23
-        # since 1.11.5
24
-        ssl_preread on;
25
-        proxy_pass $upstream;
26
-
27
-        # Increase buffer to serve video
28
-        proxy_buffer_size 10m;
29
-    }
30
-}

+ 9
- 0
doc/debian/jitsi-meet/jitsi-meet.example View File

@@ -87,6 +87,15 @@ server {
87 87
         tcp_nodelay on;
88 88
     }
89 89
 
90
+    # colibri (JVB) websockets for jvb1
91
+    location ~ ^/colibri-ws/default-id/(.*) {
92
+       proxy_pass http://127.0.0.1:9090/colibri-ws/default-id/$1$is_args$args;
93
+       proxy_http_version 1.1;
94
+       proxy_set_header Upgrade $http_upgrade;
95
+       proxy_set_header Connection "upgrade";
96
+       tcp_nodelay on;
97
+    }
98
+
90 99
     location ~ ^/([^/?&:'"]+)$ {
91 100
         try_files $uri @root_path;
92 101
     }

Loading…
Cancel
Save