mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-09-16 19:46:34 +08:00
improve turn server
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
c3d3a29c6b
commit
66851eda8f
2 changed files with 22 additions and 1 deletions
|
@ -10,6 +10,7 @@ RUN set -ex; \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
netcat \
|
netcat \
|
||||||
|
dnsutils \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,11 @@ elif [ -z "$SIGNALING_SECRET" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Turn: https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf
|
set -x
|
||||||
|
IPv4_ADDRESS="$(dig nextcloud-aio-talk A +short)"
|
||||||
|
set +x
|
||||||
|
|
||||||
|
# Turn
|
||||||
cat << TURN_CONF > "/etc/turnserver.conf"
|
cat << TURN_CONF > "/etc/turnserver.conf"
|
||||||
listening-port=$TALK_PORT
|
listening-port=$TALK_PORT
|
||||||
fingerprint
|
fingerprint
|
||||||
|
@ -32,6 +36,22 @@ pidfile=/var/tmp/turnserver.pid
|
||||||
no-tls
|
no-tls
|
||||||
no-dtls
|
no-dtls
|
||||||
userdb=/var/lib/turn/turndb
|
userdb=/var/lib/turn/turndb
|
||||||
|
# Based on https://nextcloud-talk.readthedocs.io/en/latest/TURN/#turn-server-and-internal-networks
|
||||||
|
allowed-peer-ip=$IPv4_ADDRESS
|
||||||
|
denied-peer-ip=0.0.0.0-0.255.255.255
|
||||||
|
denied-peer-ip=10.0.0.0-10.255.255.255
|
||||||
|
denied-peer-ip=100.64.0.0-100.127.255.255
|
||||||
|
denied-peer-ip=127.0.0.0-127.255.255.255
|
||||||
|
denied-peer-ip=169.254.0.0-169.254.255.255
|
||||||
|
denied-peer-ip=172.16.0.0-172.31.255.255
|
||||||
|
denied-peer-ip=192.0.0.0-192.0.0.255
|
||||||
|
denied-peer-ip=192.0.2.0-192.0.2.255
|
||||||
|
denied-peer-ip=192.88.99.0-192.88.99.255
|
||||||
|
denied-peer-ip=192.168.0.0-192.168.255.255
|
||||||
|
denied-peer-ip=198.18.0.0-198.19.255.255
|
||||||
|
denied-peer-ip=198.51.100.0-198.51.100.255
|
||||||
|
denied-peer-ip=203.0.113.0-203.0.113.255
|
||||||
|
denied-peer-ip=240.0.0.0-255.255.255.255
|
||||||
TURN_CONF
|
TURN_CONF
|
||||||
|
|
||||||
# Janus
|
# Janus
|
||||||
|
|
Loading…
Add table
Reference in a new issue