matrix-docker-ansible-deploy/roles/custom/matrix-coturn/templates/turnserver.conf.j2

79 lines
1.8 KiB
Plaintext
Raw Normal View History

#jinja2: lstrip_blocks: "True"
{% if matrix_coturn_authentication_method == 'auth-secret' %}
use-auth-secret
static-auth-secret={{ matrix_coturn_turn_static_auth_secret }}
userdb=/var/tmp/turnserver.db
{% endif %}
{% if matrix_coturn_authentication_method == 'lt-cred-mech' %}
lt-cred-mech
user={{ matrix_coturn_lt_cred_mech_username }}:{{ matrix_coturn_lt_cred_mech_password }}
{% endif %}
2019-02-28 09:51:09 +00:00
realm=turn.{{ matrix_server_fqn_matrix }}
2019-03-19 08:24:39 +00:00
min-port={{ matrix_coturn_turn_udp_min_port }}
max-port={{ matrix_coturn_turn_udp_max_port }}
{% for ip in matrix_coturn_turn_external_ip_addresses %}
external-ip={{ ip }}
{% endfor %}
2019-03-19 08:24:39 +00:00
log-file=stdout
pidfile=/var/tmp/turnserver.pid
2019-03-19 08:24:39 +00:00
no-cli
2019-03-19 08:24:39 +00:00
{% if matrix_coturn_tls_enabled %}
cert={{ matrix_coturn_tls_cert_path }}
pkey={{ matrix_coturn_tls_key_path }}
{% if not matrix_coturn_tls_v1_enabled %}
no-tlsv1
{% endif %}
{% if not matrix_coturn_tls_v1_1_enabled %}
no-tlsv1_1
{% endif %}
2019-03-19 08:24:39 +00:00
{% else %}
no-tls
no-dtls
2019-03-19 08:24:39 +00:00
{% endif %}
prod
{% if matrix_coturn_no_tcp_relay_enabled %}
2019-03-18 11:18:30 +00:00
no-tcp-relay
{% endif %}
2019-03-19 08:24:39 +00:00
{% if matrix_coturn_no_rfc5780_enabled %}
no-rfc5780
{% endif %}
{% if matrix_coturn_no_stun_backward_compatibility_enabled %}
no-stun-backward-compatibility
{% endif %}
{% if matrix_coturn_response_origin_only_with_rfc5780_enabled %}
response-origin-only-with-rfc5780
{% endif %}
2019-03-18 11:58:52 +00:00
{% if matrix_coturn_user_quota != None %}
2019-03-18 11:18:30 +00:00
user-quota={{ matrix_coturn_user_quota }}
{% endif %}
2019-03-18 11:58:52 +00:00
{% if matrix_coturn_total_quota != None %}
2019-03-18 11:18:30 +00:00
total-quota={{ matrix_coturn_total_quota }}
{% endif %}
2019-03-19 08:24:39 +00:00
{% if matrix_coturn_no_multicast_peers_enabled %}
no-multicast-peers
{% endif %}
2019-03-18 11:18:30 +00:00
{% for ip_range in matrix_coturn_denied_peer_ips %}
denied-peer-ip={{ ip_range }}
{% endfor %}
{% for ip_range in matrix_coturn_allowed_peer_ips %}
allowed-peer-ip={{ ip_range }}
{% endfor %}
{{ matrix_coturn_additional_configuration }}