From 2f67e05982319cc32c0fffd3cf73e9b7e0c41d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 9 Mar 2024 16:33:03 +0100 Subject: [PATCH] Avoid to block crear communication when call over dtls is disabled --- conf/turnserver.conf | 4 +--- scripts/_common.sh | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/turnserver.conf b/conf/turnserver.conf index e665a57..a5ff4af 100644 --- a/conf/turnserver.conf +++ b/conf/turnserver.conf @@ -13,9 +13,7 @@ cert=/etc/yunohost/certs/__DOMAIN__/crt.pem pkey=/etc/yunohost/certs/__DOMAIN__/key.pem dh-file=/etc/ssl/private/dh2048.pem -# Block clear communication -no-udp -no-tcp +_TURN_CLEAR_COM_PARAM_ # Block old protocols no-sslv2 diff --git a/scripts/_common.sh b/scripts/_common.sh index b6aeab5..32aabc2 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -128,8 +128,13 @@ configure_coturn() { then turn_external_ip+="external-ip=$public_ip6\\n" fi + local turn_clear_com_param='' + if $enable_dtls_for_audio_video_turn_call; then + turn_clear_com_param+='# Block clear communication\nno-udp\nno-tcp' + fi ynh_add_config --template="turnserver.conf" --destination="/etc/matrix-$app/coturn.conf" + sed -i "s|_TURN_CLEAR_COM_PARAM_|$turn_clear_com_param|g" /etc/matrix-$app/coturn.conf sed -i "s|_TURN_EXTERNAL_IP_|$turn_external_ip|g" /etc/matrix-$app/coturn.conf ynh_store_file_checksum --file=/etc/matrix-$app/coturn.conf }