Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STUN/TURN support #147

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ Variable | Description | Default value
`JVB_TCP_PORT` | TCP port for media used by Jitsi Videobridge when the TCP Harvester is enabled | 4443
`JVB_BREWERY_MUC` | MUC name for the JVB pool | jvbbrewery
`JVB_ENABLE_APIS` | Comma separated list of JVB APIs to enable | none
`JVB_ENABLE_STUN_TURN` | Enable STUN/TURN for JVB connections | 1
`JVB_ENABLE_P2P_STUN_TURN` | Enable STUN/TURN for peer-to-peer connections | 1
`JIGASI_XMPP_USER` | XMPP user for Jigasi MUC client connections | jigasi
`JIGASI_XMPP_PASSWORD` | XMPP password for Jigasi MUC client connections | passw0rd
`JIGASI_BREWERY_MUC` | MUC name for the Jigasi pool | jigasibrewery
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:
- ENABLE_LETSENCRYPT
- ENABLE_HTTP_REDIRECT
- ENABLE_TRANSCRIPTIONS
- JVB_ENABLE_STUN_TURN
- JVB_ENABLE_P2P_STUN_TURN
- DISABLE_HTTPS
- JICOFO_AUTH_USER
- LETSENCRYPT_DOMAIN
Expand Down
6 changes: 6 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ JVB_TCP_PORT=4443
# See https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest.md for more information
#JVB_ENABLE_APIS=rest,colibri

# Enable STUN/TURN for JVB connections
#JVB_ENABLE_STUN_TURN=1

# Enable STUN/TURN for peer-to-peer connections
#JVB_ENABLE_P2P_STUN_TURN=1

# XMPP component password for Jicofo.
JICOFO_COMPONENT_SECRET=s3cr37

Expand Down
3 changes: 3 additions & 0 deletions prosody/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ RUN \
&& apt-dpkg-wrap apt-get -d install -y jitsi-meet-tokens \
&& dpkg -x /var/cache/apt/archives/jitsi-meet-tokens*.deb /tmp \
&& mv /tmp/usr/share/jitsi-meet/prosody-plugins /prosody-plugins \
&& wget \
-O /usr/lib/prosody/modules/mod_turncredentials.lua \
https://hg.prosody.im/prosody-modules/raw-file/tip/mod_turncredentials/mod_turncredentials.lua \
&& apt-cleanup \
&& rm -rf /tmp/usr /var/cache/apt

Expand Down
4 changes: 2 additions & 2 deletions web/rootfs/defaults/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ var config = {
// minParticipants: 2,

// Use XEP-0215 to fetch STUN and TURN servers.
// useStunTurn: true,
// useStunTurn: true, //jvb

// Enable IPv6 support.
// useIPv6: true,
Expand Down Expand Up @@ -329,7 +329,7 @@ var config = {
enabled: true,

// Use XEP-0215 to fetch STUN and TURN servers.
// useStunTurn: true,
// useStunTurn: true, //p2p

// The STUN servers that will be used in the peer to peer connections
stunServers: [
Expand Down
12 changes: 12 additions & 0 deletions web/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ if [[ ! -f /config/config.js ]]; then
-e "s#// transcribingEnabled:.*#transcribingEnabled: true,#" \
/config/config.js
fi

if [[ $JVB_ENABLE_STUN_TURN -eq 1 || "$JVB_ENABLE_STUN_TURN" == "true" ]]; then
sed -i \
-e "s#// useStunTurn:.*, //jvb#useStunTurn: true, //jvb#" \
/config/config.js
fi

if [[ $JVB_ENABLE_P2P_STUN_TURN -eq 1 || "$JVB_ENABLE_P2P_STUN_TURN" == "true" ]]; then
sed -i \
-e "s#// useStunTurn:.*, //p2p#useStunTurn: true, //p2p#" \
/config/config.js
fi
fi

if [[ ! -f /config/interface_config.js ]]; then
Expand Down