3
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2025-12-26 10:40:25 +00:00

Add matrix_coturn_hostname to allow for the Coturn domain to be different than matrix_server_fqn_matrix

This commit is contained in:
Slavi Pantaleev
2025-12-25 10:01:17 +02:00
parent ed20b65912
commit edf833627e
6 changed files with 38 additions and 8 deletions

View File

@@ -18,6 +18,8 @@
matrix_coturn_enabled: true
matrix_coturn_hostname: ''
matrix_coturn_container_image_self_build: false
matrix_coturn_container_image_self_build_repo: "https://github.com/coturn/coturn"
matrix_coturn_container_image_self_build_repo_version: "docker/{{ matrix_coturn_version }}"
@@ -111,6 +113,9 @@ matrix_coturn_container_turn_range_listen_interface: "{{ '' if matrix_coturn_con
matrix_coturn_turn_udp_min_port: 49152
matrix_coturn_turn_udp_max_port: 49172
# Controls the `realm` configuration option
matrix_coturn_realm: "turn.{{ matrix_coturn_hostname }}"
# Controls which authentication method to enable.
#
# lt-cred-mech likely provides better compatibility,

View File

@@ -29,6 +29,7 @@
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
with_items:
- {'name': 'matrix_coturn_hostname', when: true}
- {'name': 'matrix_coturn_turn_static_auth_secret', when: "{{ matrix_coturn_authentication_method == 'auth-secret' }}"}
- {'name': 'matrix_coturn_lt_cred_mech_username', when: "{{ matrix_coturn_authentication_method == 'lt-cred-mech' }}"}
- {'name': 'matrix_coturn_lt_cred_mech_password', when: "{{ matrix_coturn_authentication_method == 'lt-cred-mech' }}"}

View File

@@ -11,7 +11,7 @@ lt-cred-mech
user={{ matrix_coturn_lt_cred_mech_username }}:{{ matrix_coturn_lt_cred_mech_password }}
{% endif %}
realm=turn.{{ matrix_server_fqn_matrix }}
realm={{ matrix_coturn_realm }}
min-port={{ matrix_coturn_turn_udp_min_port }}
max-port={{ matrix_coturn_turn_udp_max_port }}

View File

@@ -7,15 +7,15 @@
matrix_coturn_turn_uris: |-
{{
([
'turns:' + matrix_server_fqn_matrix + '?transport=udp',
'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
'turns:' + matrix_coturn_hostname + '?transport=udp',
'turns:' + matrix_coturn_hostname + '?transport=tcp',
] if matrix_coturn_tls_enabled else [])
+
([
'turn:' + matrix_server_fqn_matrix + '?transport=udp',
'turn:' + matrix_coturn_hostname + '?transport=udp',
] if (matrix_coturn_container_stun_plain_host_bind_port_udp != '' or matrix_coturn_container_network == 'host') else [])
+
([
'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
'turn:' + matrix_coturn_hostname + '?transport=tcp',
] if (matrix_coturn_container_stun_plain_host_bind_port_tcp != '' or matrix_coturn_container_network == 'host') else [])
}}