From 45f601c911422db0920bd37ecacd2fe1fd1be508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Fri, 15 May 2020 12:26:50 +0200 Subject: [PATCH] __coturn: allow configuration of litening-ip --- type/__coturn/files/turnserver.conf.sh | 10 +++++++++- type/__coturn/manifest | 5 +++++ type/__coturn/parameter/optional_multiple | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/type/__coturn/files/turnserver.conf.sh b/type/__coturn/files/turnserver.conf.sh index 723f4ef..ccd01c5 100755 --- a/type/__coturn/files/turnserver.conf.sh +++ b/type/__coturn/files/turnserver.conf.sh @@ -51,11 +51,19 @@ cat << EOF # Listener IP address of relay server. Multiple listeners can be specified. # If no IP(s) specified in the config file or in the command line options, # then all IPv4 and IPv6 system IPs will be used for listening. -# + #listening-ip=172.17.19.101 #listening-ip=10.207.21.238 #listening-ip=2607:f0d0:1002:51::4 +EOF + +for ip in $LISTENING_IPS; do + echo "listening-ip=$ip" +done + +cat << EOF + # Auxiliary STUN/TURN server listening endpoint. # Aux servers have almost full TURN and STUN functionality. # The (minor) limitations are: diff --git a/type/__coturn/manifest b/type/__coturn/manifest index 9d5e7de..e0b41ca 100755 --- a/type/__coturn/manifest +++ b/type/__coturn/manifest @@ -69,6 +69,11 @@ if [ -f "$__object/parameter/denied-peer" ]; then export DENIED_PEERS fi +if [ -f "$__object/parameter/listening-ip" ]; then + LISTENING_IPS=$(cat "$__object/parameter/listening-ip") + export LISTENING_IPS +fi + if [ -f "$__object/parameter/cert" ]; then CERT=$(cat "$__object/parameter/cert") export CERT diff --git a/type/__coturn/parameter/optional_multiple b/type/__coturn/parameter/optional_multiple index 6c49c91..f736fa1 100644 --- a/type/__coturn/parameter/optional_multiple +++ b/type/__coturn/parameter/optional_multiple @@ -1,2 +1,3 @@ allowed-peer denied-peer +listening-ip