From 52c926e05278f3259a2ee6563a713b5537f446e0 Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 18 Mar 2022 13:09:08 +0100 Subject: [PATCH] adjust talk hpb config Signed-off-by: szaimen --- Containers/talk/Dockerfile | 3 ++- Containers/talk/start.sh | 30 +++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index 3cbec5c3..353030a8 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -54,7 +54,8 @@ RUN mkdir -p /etc/nats; \ chown talk:talk -R /etc/nats; \ chown talk:talk -R /etc/janus; \ chown talk:talk -R /etc/signaling; \ - chown talk:talk -R /usr/share/janus + chown talk:talk -R /usr/share/janus; \ + cat /etc/janus/janus.jcfg # Give root a random password RUN echo "root:$(openssl rand -base64 12)" | chpasswd diff --git a/Containers/talk/start.sh b/Containers/talk/start.sh index 253d3187..0f15c95b 100644 --- a/Containers/talk/start.sh +++ b/Containers/talk/start.sh @@ -19,45 +19,65 @@ fi cat << TURN_CONF > "/etc/turnserver.conf" listening-port=3478 fingerprint +lt-cred-mech use-auth-secret static-auth-secret=$TURN_SECRET realm=$NC_DOMAIN total-quota=100 bps-capacity=0 stale-nonce +no-loopback-peers no-multicast-peers simple-log pidfile=/var/tmp/turnserver.pid TURN_CONF # Janus +set -x sed -i "s|#turn_rest_api_key.*|turn_rest_api_key = $JANUS_API_KEY|" /etc/janus/janus.jcfg -sed -i "s|#full_trickle|full_trickle|g" /etc/janus/janus.jcfg -sed -i 's|#interface.*|interface = "lo"|g' /etc/janus/janus.transport.websockets.jcfg -sed -i 's|#ws_interface.*|ws_interface = "lo"|g' /etc/janus/janus.transport.websockets.jcfg +sed -i "s|#full_trickle.*|full_trickle = true|g" /etc/janus/janus.jcfg +sed -i "s|#stun_server.*|stun_server = '127.0.0.1'|g" /etc/janus/janus.jcfg +sed -i "s|#stun_port.*|stun_port = 3478|g" /etc/janus/janus.jcfg +sed -i "s|#turn_port.*|turn_port = 3478|g" /etc/janus/janus.jcfg +sed -i "s|#turn_server.*|turn_server = '127.0.0.1'|g" /etc/janus/janus.jcfg +sed -i "s|#turn_type .*|turn_type = 'udp'|g" /etc/janus/janus.jcfg +sed -i "s|cert_pem|#cert_pem|g" /etc/janus/janus.jcfg +sed -i "s|cert_key|#cert_key|g" /etc/janus/janus.jcfg +sed -i "s|cert_pwd|#cert_pwd|g" /etc/janus/janus.jcfg +set +x # Signling cat << SIGNALING_CONF > "/etc/signaling/server.conf" [http] listen = 0.0.0.0:8081 + [app] debug = false + [sessions] hashkey = $(openssl rand -hex 16) blockkey = $(openssl rand -hex 16) + [clients] internalsecret = $(openssl rand -hex 16) + [backend] -allowed = ${NC_DOMAIN} +backends = backend-1 allowall = false -secret = ${SIGNALING_SECRET} timeout = 10 connectionsperhost = 8 + +[backend-1] +url = https://${NC_DOMAIN} +secret = ${SIGNALING_SECRET} + [nats] url = nats://127.0.0.1:4222 + [mcu] type = janus url = ws://127.0.0.1:8188 + [turn] apikey = ${JANUS_API_KEY} secret = ${TURN_SECRET}