From 2f48a556d282c12c90bbb41a81e4f1a3acd2ca66 Mon Sep 17 00:00:00 2001 From: Michael Jerger <michael.jerger@meissa-gmbh.de> Date: Fri, 28 Feb 2025 19:15:02 +0100 Subject: [PATCH] missing stun/turn configs --- project.clj | 4 ++-- src/main/cljc/dda/c4k_jitsi/jitsi.cljc | 5 ++++- src/main/resources/jitsi/prosody-config-common-cm.yaml | 6 +++++- src/main/resources/jitsi/web-config-envs-cm.yaml | 5 +---- src/test/cljc/dda/c4k_jitsi/jitsi_test.cljc | 6 +++++- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/project.clj b/project.clj index 0e94e64..b5ac68d 100644 --- a/project.clj +++ b/project.clj @@ -24,9 +24,9 @@ :main dda.c4k-jitsi.uberjar :uberjar-name "c4k-jitsi-standalone.jar" :dependencies [[org.clojure/tools.cli "1.1.230"] - [ch.qos.logback/logback-classic "1.5.16" + [ch.qos.logback/logback-classic "1.5.17" :exclusions [com.sun.mail/javax.mail]] - [org.slf4j/jcl-over-slf4j "2.0.16"] + [org.slf4j/jcl-over-slf4j "2.0.17"] [com.github.clj-easy/graal-build-time "1.0.5"]]}} :release-tasks [["test"] ["vcs" "assert-committed"] diff --git a/src/main/cljc/dda/c4k_jitsi/jitsi.cljc b/src/main/cljc/dda/c4k_jitsi/jitsi.cljc index e62f6f9..5048583 100644 --- a/src/main/cljc/dda/c4k_jitsi/jitsi.cljc +++ b/src/main/cljc/dda/c4k_jitsi/jitsi.cljc @@ -40,7 +40,9 @@ [(load-and-adjust-namespace "jitsi/prosody-config-serviceaccount.yaml" namespace) (-> (load-and-adjust-namespace "jitsi/prosody-config-common-cm.yaml" namespace) - (cm/replace-all-matching "JITSI_FQDN" fqdn)) + (cm/replace-all-matching "JITSI_FQDN" fqdn) + (cm/replace-key-value :STUN_HOST (str "stun." fqdn)) + (cm/replace-key-value :TURN_HOST (str "stun." fqdn))) (load-and-adjust-namespace "jitsi/prosody-config-default-cm.yaml" namespace) (load-and-adjust-namespace "jitsi/prosody-config-envs-cm.yaml" namespace) (load-and-adjust-namespace "jitsi/prosody-config-init-cm.yaml" namespace) @@ -87,6 +89,7 @@ (-> (load-and-adjust-namespace "jitsi/web-config-envs-cm.yaml" namespace) (cm/replace-key-value :XMPP_BOSH_URL_BASE (str "http://prosody." namespace ".svc.cluster.local:5280")) + (cm/replace-key-value :P2P_STUN_SERVERS (str "stun." fqdn ":443")) (cm/replace-key-value :ETHERPAD_PUBLIC_URL (str "https://etherpad." fqdn "/p/")) (cm/replace-key-value :WHITEBOARD_COLLAB_SERVER_PUBLIC_URL (str "https://excalidraw." fqdn)) ) diff --git a/src/main/resources/jitsi/prosody-config-common-cm.yaml b/src/main/resources/jitsi/prosody-config-common-cm.yaml index 8f0e06e..ea47cc1 100644 --- a/src/main/resources/jitsi/prosody-config-common-cm.yaml +++ b/src/main/resources/jitsi/prosody-config-common-cm.yaml @@ -22,4 +22,8 @@ data: ENABLE_XMPP_WEBSOCKET: 'true' ENABLE_RECORDING: "true" ENABLE_FILE_RECORDING_SERVICE_SHARING: "true" - TZ: 'Europe/Berlin' \ No newline at end of file + TZ: 'Europe/Berlin' + STUN_HOST: STUN_FQDN + STUN_PORT: "443" + TURN_HOST: STUN_FQDN + TURN_PORT: "443" \ No newline at end of file diff --git a/src/main/resources/jitsi/web-config-envs-cm.yaml b/src/main/resources/jitsi/web-config-envs-cm.yaml index b8386cb..c996e0f 100644 --- a/src/main/resources/jitsi/web-config-envs-cm.yaml +++ b/src/main/resources/jitsi/web-config-envs-cm.yaml @@ -12,9 +12,6 @@ data: JICOFO_AUTH_USER: focus XMPP_BOSH_URL_BASE: REPLACE_ME DEFAULT_LANGUAGE: de - RESOLUTION: "480" - RESOLUTION_MIN: "240" - RESOLUTION_WIDTH: "853" - RESOLUTION_WIDTH_MIN: "427" + P2P_STUN_SERVERS: REPLACE_ME ETHERPAD_PUBLIC_URL: REPLACE_ME WHITEBOARD_COLLAB_SERVER_PUBLIC_URL: REPLACE_ME \ No newline at end of file diff --git a/src/test/cljc/dda/c4k_jitsi/jitsi_test.cljc b/src/test/cljc/dda/c4k_jitsi/jitsi_test.cljc index 364d778..4158399 100644 --- a/src/test/cljc/dda/c4k_jitsi/jitsi_test.cljc +++ b/src/test/cljc/dda/c4k_jitsi/jitsi_test.cljc @@ -47,7 +47,11 @@ :ENABLE_XMPP_WEBSOCKET "true", :ENABLE_RECORDING "true", :ENABLE_FILE_RECORDING_SERVICE_SHARING "true", - :TZ "Europe/Berlin"}} + :TZ "Europe/Berlin" + :STUN_HOST "stun.xy.xy.xy", + :STUN_PORT "443", + :TURN_HOST "stun.xy.xy.xy", + :TURN_PORT "443"}} (second (cut/prosody-config {:fqdn "xy.xy.xy" :namespace "jitsi"}))))