feat(prosody): allow s2s whitelist additions (#1940)

* feat(prosody): allow s2s whitelist additions

* change to vhost name to reflect additional uses

* whitespace improvement
pull/1942/head
Aaron van Meerten 1 month ago committed by GitHub
parent b89c328eb0
commit a88c6e4195
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      docker-compose.yml
  2. 6
      prosody/rootfs/defaults/conf.d/visitors.cfg.lua
  3. 16
      prosody/rootfs/defaults/prosody.cfg.lua

@ -291,6 +291,7 @@ services:
- PROSODY_TRUSTED_PROXIES - PROSODY_TRUSTED_PROXIES
- PROSODY_VISITOR_INDEX - PROSODY_VISITOR_INDEX
- PROSODY_VISITORS_MUC_PREFIX - PROSODY_VISITORS_MUC_PREFIX
- PROSODY_VISITORS_S2S_VHOSTS
- PUBLIC_URL - PUBLIC_URL
- STUN_HOST - STUN_HOST
- STUN_PORT - STUN_PORT

@ -104,6 +104,12 @@ s2sout_override = {
{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}} {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}}
["{{ $XMPP_RECORDER_DOMAIN }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}"; ["{{ $XMPP_RECORDER_DOMAIN }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}";
{{ end -}} {{ end -}}
{{ if .Env.PROSODY_VISITORS_S2S_VHOSTS -}}
{{- range $index, $vhost := (splitList "," .Env.PROSODY_VISITORS_S2S_VHOSTS | compact) }}
["{{ $vhost }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}";
{{ end -}}
{{ end -}}
} }
muc_limit_messages_count = 10; muc_limit_messages_count = 10;

@ -224,20 +224,22 @@ s2s_ports = { {{ $S2S_PORT }} } -- Listen on specific s2s port
{{ if eq $PROSODY_MODE "visitors" -}} {{ if eq $PROSODY_MODE "visitors" -}}
s2s_whitelist = { s2s_whitelist = {
{{ if $ENABLE_VISITORS -}} {{- if $ENABLE_VISITORS }}
'{{ $XMPP_MUC_DOMAIN }}'; -- needed for visitors to send messages to main room '{{ $XMPP_MUC_DOMAIN }}'; -- needed for visitors to send messages to main room
'visitors.{{ $XMPP_DOMAIN }}'; -- needed for sending promotion request to visitors.{{ $XMPP_DOMAIN }} component 'visitors.{{ $XMPP_DOMAIN }}'; -- needed for sending promotion request to visitors.{{ $XMPP_DOMAIN }} component
'{{ $XMPP_DOMAIN }}'; -- unavailable presences back to main room '{{ $XMPP_DOMAIN }}'; -- unavailable presences back to main room
{{- end }}
{{ end -}} {{- if $ENABLE_GUEST_DOMAIN }}
{{ if $ENABLE_GUEST_DOMAIN -}}
'{{ $XMPP_GUEST_DOMAIN }}'; '{{ $XMPP_GUEST_DOMAIN }}';
{{- end }}
{{ end }} {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}}
{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}}
'{{ $XMPP_RECORDER_DOMAIN }}'; '{{ $XMPP_RECORDER_DOMAIN }}';
{{- end }}
{{ end -}} {{- if .Env.PROSODY_VISITORS_S2S_VHOSTS }}
'{{ join "';\n '" (splitList "," .Env.PROSODY_VISITORS_S2S_VHOSTS | compact) }}';
{{- end }}
} }
{{ end -}} {{ end -}}

Loading…
Cancel
Save