diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-10-29 16:25:10 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-02-06 01:42:21 +0300 |
commit | bcc48cfe5e82fc2466cd6e20aac995549b771edf (patch) | |
tree | 284402e8c42191a472acadd5fd82e53d720be8e1 /tests | |
parent | 7ddab76609fb383514ff5071e739e6630659e5d5 (diff) |
Add support for "turns:" scheme
Until now no scheme could be configured to connect to the TURN server
and "turn:" was used by default. The "turns:" scheme defines a
connection over TLS, which in some cases is needed by clients behind a
very restrictive firewall that only allows TLS connections. However,
encrypted TURN connections also require a certificate to be set in the
TURN server, which may not be always available. Moreover, encrypted TURN
connections also require a domain. Due to all this now it is possible to
set the TURN server scheme to "turn:", "turns:" or both, so the
administrator can set the best suiting one.
Already configured TURN servers that have no scheme configured yet
defaults to "turn:" to keep the same behaviour as before. New configured
TURN servers also default to "turn:", as "turns:" has some additional
requirements as explained above.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/ConfigTest.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/php/ConfigTest.php b/tests/php/ConfigTest.php index bda84ac5f..c533e36f2 100644 --- a/tests/php/ConfigTest.php +++ b/tests/php/ConfigTest.php @@ -116,11 +116,13 @@ class ConfigTest extends TestCase { ->with('spreed', 'turn_servers', '') ->willReturn(json_encode([ [ + // No scheme explicitly given 'server' => 'turn.example.org', 'secret' => 'thisisasupersecretsecret', 'protocols' => 'udp,tcp', ], [ + 'schemes' => 'turn,turns', 'server' => 'turn2.example.com', 'secret' => 'ThisIsAlsoSuperSecret', 'protocols' => 'tcp', @@ -150,6 +152,7 @@ class ConfigTest extends TestCase { $server = $helper->getTurnSettings(); if ($server['server'] === 'turn.example.org') { $this->assertSame([ + 'schemes' => 'turn', 'server' => 'turn.example.org', 'username' => '1479829425:abcdefghijklmnop', 'password' => '4VJLVbihLzuxgMfDrm5C3zy8kLQ=', @@ -157,6 +160,7 @@ class ConfigTest extends TestCase { ], $server); } else { $this->assertSame([ + 'schemes' => 'turn,turns', 'server' => 'turn2.example.com', 'username' => '1479829425:abcdefghijklmnop', 'password' => 'Ol9DEqnvyN4g+IAM+vFnqhfWUTE=', |