Skip to content

jicofo: add optional XMPP_PORT value #1275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ services:
image: jitsi/prosody:latest
restart: ${RESTART_POLICY}
expose:
- '5222'
- '${XMPP_PORT:-5222}'
- '5347'
- '5280'
volumes:
Expand Down Expand Up @@ -255,6 +255,7 @@ services:
- XMPP_MUC_DOMAIN
- XMPP_RECORDER_DOMAIN
- XMPP_SERVER
- XMPP_PORT
depends_on:
- prosody
networks:
Expand Down
3 changes: 3 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions jibri/rootfs/defaults/jibri.conf
Original file line number Diff line number Diff line change
@@ -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 -}}
{{ $ENABLE_XMPP_PORT := .Env.XMPP_PORT | default "0" | toBool }}

jibri {
// A unique identifier for this Jibri
Expand Down Expand Up @@ -48,6 +49,9 @@ jibri {
// The login information for the control MUC
control-login {
domain = "{{ .Env.XMPP_AUTH_DOMAIN }}"
{{ if $ENABLE_XMPP_PORT -}}
port = "{{ .Env.XMPP_PORT }}"
{{ end -}}
username = "{{ .Env.JIBRI_XMPP_USER }}"
password = "{{ .Env.JIBRI_XMPP_PASSWORD }}"
}
Expand Down
4 changes: 4 additions & 0 deletions jicofo/rootfs/defaults/jicofo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
{{ $ENABLE_XMPP_PORT := .Env.XMPP_PORT | default "0" | toBool }}

jicofo {
{{ if $ENABLE_AUTH }}
Expand Down Expand Up @@ -134,6 +135,9 @@ jicofo {
client {
enabled = true
hostname = "{{ .Env.XMPP_SERVER }}"
{{ if $ENABLE_XMPP_PORT -}}
port = "{{ .Env.XMPP_PORT }}"
{{ end -}}
domain = "{{ .Env.XMPP_AUTH_DOMAIN }}"
username = "{{ .Env.JICOFO_AUTH_USER }}"
password = "{{ .Env.JICOFO_AUTH_PASSWORD }}"
Expand Down
5 changes: 5 additions & 0 deletions jigasi/rootfs/defaults/sip-communicator.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ $ENABLE_XMPP_PORT := .Env.XMPP_PORT | default "0" | toBool }}

net.java.sip.communicator.impl.protocol.SingleCallInProgressPolicy.enabled=false

# Adjust opus encoder complexity
Expand Down Expand Up @@ -65,6 +67,9 @@ 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 }}
{{ if $ENABLE_XMPP_PORT -}}
net.java.sip.communicator.impl.protocol.jabber.acc1.SERVER_PORT={{ .Env.XMPP_PORT }}
{{ end -}}
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
Expand Down
5 changes: 5 additions & 0 deletions prosody/rootfs/defaults/prosody.cfg.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }}
{{ $ENABLE_XMPP_PORT := .Env.XMPP_PORT | default "0" | toBool }}

-- Prosody Example Configuration File
--
Expand Down Expand Up @@ -110,6 +111,10 @@ pidfile = "/config/data/prosody.pid";

c2s_require_encryption = false

{{ if $ENABLE_XMPP_PORT -}}
-- force c2s port
c2s_ports = { {{ .Env.XMPP_PORT }} } -- Listen on specific c2s port instead of default 5222
{{ end -}}
-- 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.
Expand Down