From 0eaf173701ea55d493893e24b009619a4509cc8b Mon Sep 17 00:00:00 2001 From: hexlocation Date: Thu, 26 Dec 2024 22:33:47 +0100 Subject: [PATCH] feat: add turn support --- conf.d/01-modules.cfg.lua | 1 + conf.d/05-vhost.cfg.lua | 6 ++++++ readme.md | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/conf.d/01-modules.cfg.lua b/conf.d/01-modules.cfg.lua index 6f8640f..57aa216 100644 --- a/conf.d/01-modules.cfg.lua +++ b/conf.d/01-modules.cfg.lua @@ -24,6 +24,7 @@ modules_enabled = { "ping"; -- Replies to XMPP pings with pongs "pep"; -- Enables users to publish their mood, activity, playing music and more "register"; -- Allow users to register on this server using a client and change passwords + "turn_external"; -- Allow users to make voice/video calls --"muc"; -- [Loaded as component, therefore commented here] Multi-user chats (XEP-0045) -- Admin interfaces diff --git a/conf.d/05-vhost.cfg.lua b/conf.d/05-vhost.cfg.lua index 1f5bcec..a269481 100644 --- a/conf.d/05-vhost.cfg.lua +++ b/conf.d/05-vhost.cfg.lua @@ -47,3 +47,9 @@ Component (domain_proxy) "proxy65" -- Implements a XEP-0060 pubsub service. Component (domain_pubsub) "pubsub" + +-- Set TURN server information. + +turn_external_host = os.getenv("TURN_EXTERNAL_HOST") or "turn" .. domain; +turn_external_port = os.getenv("TURN_EXTERNAL_PORT") or 3478; +turn_external_secret = os.getenv("TURN_EXTERNAL_SECRET"); diff --git a/readme.md b/readme.md index de5ab62..a2c9086 100644 --- a/readme.md +++ b/readme.md @@ -235,6 +235,9 @@ sudo chown 999:999 ./data | **SERVER_CONTACT_INFO_SALES** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:sales@**DOMAIN**" | | **SERVER_CONTACT_INFO_SECURITY** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:security@**DOMAIN**" | | **SERVER_CONTACT_INFO_SUPPORT** | A list of strings. Each string should be an URI. See [here](https://prosody.im/doc/modules/mod_server_contact_info). | *optional* | "xmpp:support@**DOMAIN**" | +| **TURN_EXTERNAL_HOST** | The external hostname for the TURN server. | *optional* | "turn.**DOMAIN**" | +| **TURN_EXTERNAL_PORT** | The external port for the TURN server. | *optional* | "" | +| **TURN_EXTERNAL_SECRET** | The external secret for the TURN server. | *optional* | "" | | **PROSODY_ADMINS** | Specify who is an administrator. List of adresses. Eg. "me@example.com", "admin@example.net" | *optional* | "" | #### DNS @@ -246,6 +249,7 @@ You need these DNS record pointing to your server: * proxy.domain.tld * pubsub.domain.tld * upload.domain.tld +* turn.domain.tld * A SRV record for _xmpps-client._tcp.domain.tld for port 5223. where domain.tld is the environment variable DOMAIN.