From 95af77896d8c9e27c91c69846aa5aab1f0d74452 Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Mon, 2 May 2022 08:30:48 -0500 Subject: [PATCH] jicofo: add optional XMPP_PORT value (#1275) * jicofo: add optional XMPP_PORT value * include compose and env example for XMPP_PORT * extends use of the XMPP_PORT property * fix compose to use default * re-commenting XMPP_PORT value * include XMPP_PORT in compose for all services * always use $XMPP_PORT, value defaulted in template * missing JVB setting --- docker-compose.yml | 6 +++++- env.example | 3 +++ jibri.yml | 1 + jibri/rootfs/defaults/jibri.conf | 2 ++ jicofo/rootfs/defaults/jicofo.conf | 2 ++ jigasi.yml | 1 + jigasi/rootfs/defaults/sip-communicator.properties | 3 +++ jvb/rootfs/defaults/jvb.conf | 2 ++ prosody/rootfs/defaults/prosody.cfg.lua | 4 ++++ 9 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 07f6119..ee34d92 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -126,6 +126,7 @@ services: - XMPP_GUEST_DOMAIN - XMPP_MUC_DOMAIN - XMPP_RECORDER_DOMAIN + - XMPP_PORT networks: meet.jitsi: @@ -134,7 +135,7 @@ services: image: jitsi/prosody:latest restart: ${RESTART_POLICY} expose: - - '5222' + - '${XMPP_PORT:-5222}' - '5347' - '5280' volumes: @@ -204,6 +205,7 @@ services: - XMPP_MUC_MODULES - XMPP_INTERNAL_MUC_MODULES - XMPP_RECORDER_DOMAIN + - XMPP_PORT networks: meet.jitsi: aliases: @@ -255,6 +257,7 @@ services: - XMPP_MUC_DOMAIN - XMPP_RECORDER_DOMAIN - XMPP_SERVER + - XMPP_PORT depends_on: - prosody networks: @@ -295,6 +298,7 @@ services: - XMPP_AUTH_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN - XMPP_SERVER + - XMPP_PORT depends_on: - prosody networks: diff --git a/env.example b/env.example index 9ee31ac..cf9ee4e 100644 --- a/env.example +++ b/env.example @@ -233,6 +233,9 @@ XMPP_DOMAIN=meet.jitsi # Internal XMPP server XMPP_SERVER=xmpp.meet.jitsi +# Internal XMPP server c2s port +#XMPP_PORT=5222 + # Internal XMPP server URL XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280 diff --git a/jibri.yml b/jibri.yml index be29ab8..981219d 100644 --- a/jibri.yml +++ b/jibri.yml @@ -38,6 +38,7 @@ services: - XMPP_INTERNAL_MUC_DOMAIN - XMPP_RECORDER_DOMAIN - XMPP_SERVER + - XMPP_PORT - XMPP_TRUST_ALL_CERTS depends_on: - jicofo diff --git a/jibri/rootfs/defaults/jibri.conf b/jibri/rootfs/defaults/jibri.conf index 2754485..81e0cb9 100644 --- a/jibri/rootfs/defaults/jibri.conf +++ b/jibri/rootfs/defaults/jibri.conf @@ -1,6 +1,7 @@ {{ $JIBRI_USAGE_TIMEOUT := .Env.JIBRI_USAGE_TIMEOUT | default "0" -}} {{ $JIBRI_RECORDING_RESOLUTION := .Env.JIBRI_RECORDING_RESOLUTION | default "1280x720" -}} {{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} jibri { // A unique identifier for this Jibri @@ -48,6 +49,7 @@ jibri { // The login information for the control MUC control-login { domain = "{{ .Env.XMPP_AUTH_DOMAIN }}" + port = "{{ $XMPP_PORT }}" username = "{{ .Env.JIBRI_XMPP_USER }}" password = "{{ .Env.JIBRI_XMPP_PASSWORD }}" } diff --git a/jicofo/rootfs/defaults/jicofo.conf b/jicofo/rootfs/defaults/jicofo.conf index 52493e5..b94a99d 100644 --- a/jicofo/rootfs/defaults/jicofo.conf +++ b/jicofo/rootfs/defaults/jicofo.conf @@ -4,6 +4,7 @@ {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool }} {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool }} {{ $ENABLE_AUTO_LOGIN := .Env.ENABLE_AUTO_LOGIN | default "1" | toBool }} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} jicofo { {{ if $ENABLE_AUTH }} @@ -134,6 +135,7 @@ jicofo { client { enabled = true hostname = "{{ .Env.XMPP_SERVER }}" + port = "{{ $XMPP_PORT }}" domain = "{{ .Env.XMPP_AUTH_DOMAIN }}" username = "{{ .Env.JICOFO_AUTH_USER }}" password = "{{ .Env.JICOFO_AUTH_PASSWORD }}" diff --git a/jigasi.yml b/jigasi.yml index 2b5d9a8..491ca53 100644 --- a/jigasi.yml +++ b/jigasi.yml @@ -18,6 +18,7 @@ services: - XMPP_MUC_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN - XMPP_SERVER + - XMPP_PORT - XMPP_DOMAIN - PUBLIC_URL - JIGASI_SIP_URI diff --git a/jigasi/rootfs/defaults/sip-communicator.properties b/jigasi/rootfs/defaults/sip-communicator.properties index 064b579..67c1616 100644 --- a/jigasi/rootfs/defaults/sip-communicator.properties +++ b/jigasi/rootfs/defaults/sip-communicator.properties @@ -1,3 +1,5 @@ +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} + net.java.sip.communicator.impl.protocol.SingleCallInProgressPolicy.enabled=false # Adjust opus encoder complexity @@ -65,6 +67,7 @@ net.java.sip.communicator.impl.protocol.jabber.acc1.ACCOUNT_UID=Jabber:{{ .Env.J net.java.sip.communicator.impl.protocol.jabber.acc1.USER_ID={{ .Env.JIGASI_XMPP_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }} net.java.sip.communicator.impl.protocol.jabber.acc1.IS_SERVER_OVERRIDDEN=true net.java.sip.communicator.impl.protocol.jabber.acc1.SERVER_ADDRESS={{ .Env.XMPP_SERVER }} +net.java.sip.communicator.impl.protocol.jabber.acc1.SERVER_PORT={{ $XMPP_PORT }} net.java.sip.communicator.impl.protocol.jabber.acc1.PASSWORD={{ .Env.JIGASI_XMPP_PASSWORD | b64enc }} net.java.sip.communicator.impl.protocol.jabber.acc1.AUTO_GENERATE_RESOURCE=true net.java.sip.communicator.impl.protocol.jabber.acc1.RESOURCE_PRIORITY=30 diff --git a/jvb/rootfs/defaults/jvb.conf b/jvb/rootfs/defaults/jvb.conf index ab099e8..6aed978 100644 --- a/jvb/rootfs/defaults/jvb.conf +++ b/jvb/rootfs/defaults/jvb.conf @@ -6,6 +6,7 @@ {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool }} {{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}} {{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.JVB_WS_SERVER_ID_FALLBACK -}} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} videobridge { ice { @@ -18,6 +19,7 @@ videobridge { configs { shard { HOSTNAME = "{{ .Env.XMPP_SERVER }}" + PORT = "{{ $XMPP_PORT }}" DOMAIN = "{{ .Env.XMPP_AUTH_DOMAIN }}" USERNAME = "{{ .Env.JVB_AUTH_USER }}" PASSWORD = "{{ .Env.JVB_AUTH_PASSWORD }}" diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 3b9311a..ee0241e 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -1,4 +1,5 @@ {{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} -- Prosody Example Configuration File -- @@ -110,6 +111,9 @@ pidfile = "/config/data/prosody.pid"; c2s_require_encryption = false +-- set c2s port +c2s_ports = { {{ $XMPP_PORT }} } -- Listen on specific c2s port + -- Force certificate authentication for server-to-server connections? -- This provides ideal security, but requires servers you communicate -- with to support encryption AND present valid, trusted certificates.