diff --git a/README.md b/README.md index af650db..3e4bec5 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ For VoIP and video conferencing a TURN server is also installed and configured. ``` sudo yunohost app setting galene turnserver_port -sudo yunohost app setting galene turnserver_alt_port ``` The TURN server will also choose a port dynamically when a new call starts. The range is between 49152 - 65535. diff --git a/README_fr.md b/README_fr.md index 4881046..a866fd6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,7 +33,6 @@ Pour la VoIP et la visioconférence, un serveur TURN est également installé et ``` sudo yunohost app setting galene turnserver_port -sudo yunohost app setting galene turnserver_alt_port ``` Le serveur TURN choisira également un port de manière dynamique lors du démarrage d'une nouvelle visioconférence. La plage est comprise entre 49152 et 65535. diff --git a/conf/coturn/turnserver.conf b/conf/coturn/turnserver.conf index a6af887..f24738a 100644 --- a/conf/coturn/turnserver.conf +++ b/conf/coturn/turnserver.conf @@ -1,10 +1,8 @@ lt-cred-mech -use-auth-secret -static-auth-secret=__TURNSERVER_PWD__ +listening-port=__TURNSERVER_PORT__ +user=__APP__:__TURNSERVER_PWD__ realm=__DOMAIN__ -listening-port=__TURNSERVER_PORT__ -alt-listening-port=__TURNSERVER_ALT_PORT__ min-port=49152 max-port=65535 diff --git a/conf/ice-servers.json b/conf/ice-servers.json index 98f9e02..cc898a2 100644 --- a/conf/ice-servers.json +++ b/conf/ice-servers.json @@ -2,11 +2,8 @@ { "urls": [ "turn:__DOMAIN__:__TURNSERVER_PORT__", - "turn:__DOMAIN__:__TURNSERVER_ALT_PORT__", "turn:__DOMAIN__:__TURNSERVER_PORT__?transport=tcp", - "turn:__DOMAIN__:__TURNSERVER_ALT_PORT__?transport=tcp", - "turn:__DOMAIN__:__TURNSERVER_PORT__?transport=udp", - "turn:__DOMAIN__:__TURNSERVER_ALT_PORT__?transport=udp" + "turn:__DOMAIN__:__TURNSERVER_PORT__?transport=udp" ], "username": "__APP__", "credential": "__TURNSERVER_PWD__", diff --git a/scripts/install b/scripts/install index e0bf0f9..6cec5d8 100755 --- a/scripts/install +++ b/scripts/install @@ -27,10 +27,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url="/" admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC -email=$(ynh_user_get_info --username=$admin --key=mail) -ynh_print_OFF password=$YNH_APP_ARG_PASSWORD -ynh_print_ON group_name=$YNH_APP_ARG_GROUP_NAME architecture=$(ynh_detect_arch) @@ -84,17 +81,14 @@ ynh_script_progression --message="Finding an available port..." --weight=3 # Find an available port port=$(ynh_find_port --port=8443) turnserver_port=$(ynh_find_port --port=1194) -turnserver_alt_port=$(ynh_find_port --port=$((turnserver_port+1))) # Open the ports ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_exec_warn_less yunohost firewall allow Both $turnserver_port -ynh_exec_warn_less yunohost firewall allow Both $turnserver_alt_port # Store opened ports ynh_app_setting_set --app=$app --key=port --value=$port ynh_app_setting_set --app=$app --key=turnserver_port --value=$turnserver_port -ynh_app_setting_set --app=$app --key=turnserver_alt_port --value=$turnserver_alt_port #================================================= # INSTALL DEPENDENCIES diff --git a/scripts/remove b/scripts/remove index 5b4490c..78cdef0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port) -turnserver_alt_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_port) #================================================= # STANDARD REMOVE @@ -98,11 +97,6 @@ then ynh_exec_warn_less yunohost firewall disallow Both $turnserver_port fi -if yunohost firewall list | grep -q "\- $turnserver_alt_port$" -then - ynh_exec_warn_less yunohost firewall disallow Both $turnserver_alt_port -fi - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 12f4966..f344407 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,10 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) group_name=$(ynh_app_setting_get --app=$app --key=group_name) port=$(ynh_app_setting_get --app=$app --key=port) turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port) -turnserver_alt_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_port) -ynh_print_OFF turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd) -ynh_print_ON #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -132,7 +129,6 @@ fi # Ouvre le port dans le firewall ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_exec_warn_less yunohost firewall allow Both $turnserver_port -ynh_exec_warn_less yunohost firewall allow Both $turnserver_alt_port #================================================= # RESTORE USER RIGHTS diff --git a/scripts/upgrade b/scripts/upgrade index 4fbac23..82c402e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,7 +24,6 @@ password=$(ynh_app_setting_get --app=$app --key=password) group_name=$(ynh_app_setting_get --app=$app --key=group_name) port=$(ynh_app_setting_get --app=$app --key=port) turnserver_port=$(ynh_app_setting_get --app=$app --key=turnserver_port) -turnserver_alt_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_port) turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd) architecture=$(ynh_detect_arch) @@ -135,11 +134,11 @@ then ynh_replace_string --match_string="TURNSERVER_ENABLED=1" --replace_string="TURNSERVER_ENABLED=0" --target_file=/etc/default/coturn # Set a port for each service in turnserver - turnserver_alt_port=$(ynh_find_port --port=$((turnserver_port+1))) + turnserver_port=$(ynh_find_port --port=1194) - ynh_app_setting_set --app=$app --key=turnserver_alt_port --value=$turnserver_alt_port + ynh_app_setting_set --app=$app --key=turnserver_alt_port --value=$turnserver_port - yunohost firewall allow Both $turnserver_alt_port > /dev/null 2>&1 + ynh_exec_warn_less yunohost firewall allow Both $turnserver_port #================================================= # MAKE A CLEAN LOGROTATE CONFIG