summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-03-15 12:22:18 +0000
committerMatthew Hodgson <matthew@matrix.org>2017-03-15 12:22:18 +0000
commite0ff66251f71cb46aea30a187edc1dc027760b9e (patch)
treeb3e4f4f880c78734bb185d710baae36b0ddf47e4 /synapse/config
parentMerge pull request #2008 from matrix-org/erikj/notifier_stats (diff)
downloadsynapse-e0ff66251f71cb46aea30a187edc1dc027760b9e.tar.xz
add setting (on by default) to support TURN for guests
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/voip.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/config/voip.py b/synapse/config/voip.py
index eeb693027b..c93c92d177 100644
--- a/synapse/config/voip.py
+++ b/synapse/config/voip.py
@@ -23,6 +23,7 @@ class VoipConfig(Config):
         self.turn_username = config.get("turn_username")
         self.turn_password = config.get("turn_password")
         self.turn_user_lifetime = self.parse_duration(config["turn_user_lifetime"])
+        self.turn_allow_guests = config.get("turn_allow_guests") or True
 
     def default_config(self, **kwargs):
         return """\
@@ -41,4 +42,11 @@ class VoipConfig(Config):
 
         # How long generated TURN credentials last
         turn_user_lifetime: "1h"
+
+        # Whether guests should be allowed to use the TURN server.
+        # This is defaults to True, otherwise VoIP will be unreliable for guests.
+        # However, it does introduce a slight security risk as it allows users to
+        # connect to arbitrary endpoints without having first signed up for a
+        # valid account (e.g. by passing a CAPTCHA).
+        turn_allow_guests: True
         """