diff --git a/webapps/jitsimeet/LISEZMOI.md b/webapps/jitsimeet/LISEZMOI.md new file mode 100644 index 00000000..113a88e7 --- /dev/null +++ b/webapps/jitsimeet/LISEZMOI.md @@ -0,0 +1,47 @@ +jitsimeet +===== + +Ce rôle installe un serveur jitsimeet. + +Notez qu'hormis le présent fichier LISEZMOI.md, tous les fichiers du rôle jitsimeet sont rédigés en anglais afin de suivre les conventions de la communauté Ansible, favoriser sa réutilisation et son amélioration, etc. Libre à vous cependant de faire appel à ce role dans un playbook rédigé principalement en français ou toute autre langue. + +Requis +------ + +... + +Variables du rôle +----------------- + +Plusieurs des valeurs par défaut dans defaults/main.yml doivent être changées soit directement dans defaults/main.yml ou mieux encore en les supplantant ailleurs, par exemple dans votre playbook (voir l'exemple ci-bas). + +Dépendances +------------ + +... + +Exemple de playbook +------------------- + +``` +- name: "Déployer un serveur jitsimeet" + hosts: + - all + vars: + # Supplanter ici les variables du rôle + jitsimeet_domains: ['votre-vrai-domaine.org'] + service: 'mon-jitsimeet' + + roles: + - { role: webapps/jitsimeet , tags: "jitsimeet" } +``` + +Licence +------- + +GPLv3 + +Infos sur l'auteur +------------------ + +Mathieu Gauthier-Pilote, administrateur de systèmes chez Evolix. diff --git a/webapps/jitsimeet/README.md b/webapps/jitsimeet/README.md new file mode 100644 index 00000000..b3e48031 --- /dev/null +++ b/webapps/jitsimeet/README.md @@ -0,0 +1,47 @@ +jitsimeet +===== + +This role installs or upgrades the server for jitsimeet. + +FRENCH: Voir le fichier LISEZMOI.md pour le français. + +Requirements +------------ + +... + +Role Variables +-------------- + +Several of the default values in defaults/main.yml must be changed either directly in defaults/main.yml or better even by overwriting them somewhere else, for example in your playbook (see the example below). + +Dependencies +------------ + +... + +Example Playbook +---------------- + +``` +- name: "Deploy a jitsimeet server" + hosts: + - all + vars: + # Overwrite the role variables here + jitsimeet_domains: ['your-real-domain.org'] + service: 'my-jitsimeet' + + roles: + - { role: webapps/jitsimeet , tags: "jitsimeet" } +``` + +License +------- + +GPLv3 + +Author Information +------------------ + +Mathieu Gauthier-Pilote, sys. admin. at Evolix. diff --git a/webapps/jitsimeet/defaults/main.yml b/webapps/jitsimeet/defaults/main.yml new file mode 100644 index 00000000..35b02989 --- /dev/null +++ b/webapps/jitsimeet/defaults/main.yml @@ -0,0 +1,17 @@ +--- +# defaults file for main vars +apt_keyring_dir: "{{ ansible_distribution_major_version is version('12', '<') | ternary('/etc/apt/trusted.gpg.d', '/etc/apt/keyrings') }}" + +jitsimeet_system_dep: "['gnupg2', 'curl', 'apt-transport-https', 'default-jdk', 'lua5.2', 'lua-unbound', 'certbot', 'python3-certbot-nginx']" + +jitsimeet_domains: ['jitsi.example.net'] +jitsimeet_turn_domains: ['turn.jitsi.example.net'] +jitsimeet_certbot_admin_email: 'security@example.net' + +jitsimeet_cert_choice: "Generate a new self-signed certificate (You will later get a chance to obtain a Let's encrypt certificate)" +jitsimeet_ssl_cert_path: "/etc/ssl/certs/ssl-cert-snakeoil.pem" +jitsimeet_ssl_key_path: "/etc/ssl/private/ssl-cert-snakeoil.key" +jitsimeet_turn_secret: "YOU_ABSOLUTELY_MUST_CHANGE_ME" +jitsimeet_jvb_secret: "NOT_CHANGING_ME_IS_SUPER_UNCOOL" +jitsimeet_jvb_muc_nick: "1899aaf3-3991-4770-9c8c-113906dc0a2e" +jitsimeet_colibri_ext_port: '8443' diff --git a/webapps/jitsimeet/files/jitsimeet.gpg b/webapps/jitsimeet/files/jitsimeet.gpg new file mode 100644 index 00000000..2ee72812 Binary files /dev/null and b/webapps/jitsimeet/files/jitsimeet.gpg differ diff --git a/webapps/jitsimeet/files/prosody.gpg b/webapps/jitsimeet/files/prosody.gpg new file mode 100644 index 00000000..117d429b Binary files /dev/null and b/webapps/jitsimeet/files/prosody.gpg differ diff --git a/webapps/jitsimeet/handlers/main.yml b/webapps/jitsimeet/handlers/main.yml new file mode 100644 index 00000000..5f477271 --- /dev/null +++ b/webapps/jitsimeet/handlers/main.yml @@ -0,0 +1,38 @@ +--- +# handlers file + +- name: reload nginx + ansible.builtin.systemd: + name: nginx + state: reloaded + +- name: restart nginx + ansible.builtin.systemd: + name: nginx + state: restarted + +- name: restart jvb + ansible.builtin.systemd: + name: jitsi-videobridge2 + state: restarted + +- name: restart prosody + ansible.builtin.systemd: + name: prosody + state: restarted + +- name: restart jicofo + ansible.builtin.systemd: + name: jicofo + state: restarted + +- name: restart coturn + ansible.builtin.systemd: + name: coturn + state: restarted + +- name: restart jitsimeet_all + loop: "{{ jitsimeet_all.results | selectattr('changed', 'equalto', true) | map(attribute='item') | map(attribute='name') | list }}" + systemd: + name: '{{ item }}' + state: restarted diff --git a/webapps/jitsimeet/meta/main.yml b/webapps/jitsimeet/meta/main.yml new file mode 100644 index 00000000..b065fb2a --- /dev/null +++ b/webapps/jitsimeet/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: Mathieu Gauthier-Pilote + description: sys. admin. + company: Evolix + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license GPL-3.0-only + + min_ansible_version: 2.10 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/webapps/jitsimeet/tasks/apt_sources.yml b/webapps/jitsimeet/tasks/apt_sources.yml new file mode 100644 index 00000000..3638b595 --- /dev/null +++ b/webapps/jitsimeet/tasks/apt_sources.yml @@ -0,0 +1,55 @@ +--- + +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + +- name: Prosody GPG key is installed + ansible.builtin.copy: + src: prosody.gpg + dest: "{{ apt_keyring_dir }}/prosody.gpg" + force: true + mode: "0644" + owner: root + group: root + +- name: Jitsi Meet GPG key is installed + ansible.builtin.copy: + src: jitsimeet.gpg + dest: "{{ apt_keyring_dir }}/jitsimeet.gpg" + force: true + mode: "0644" + owner: root + group: root + +- name: Add Prosody repository (Debian <12) + ansible.builtin.apt_repository: + repo: "deb [signed-by={{ apt_keyring_dir }}/prosody.gpg] https://packages.prosody.im/debian {{ ansible_distribution_release }} main" + filename: prosody + state: present + update_cache: yes + when: ansible_distribution_major_version is version('12', '<') + +- name: Add Prosody repository (Debian >=12) + ansible.builtin.template: + src: apt/prosody.sources.j2 + dest: /etc/apt/sources.list.d/prosody.sources + when: ansible_distribution_major_version is version('12', '>=') + +- name: Add Jitsi Meet repository (Debian <12) + ansible.builtin.apt_repository: + repo: "deb [signed-by={{ apt_keyring_dir }}/jitsimeet.gpg] https://download.jitsi.org stable/" + filename: jitsimeet + state: present + update_cache: yes + when: ansible_distribution_major_version is version('12', '<') + +- name: Add Jitsi Meet repository (Debian >=12) + ansible.builtin.template: + src: apt/jitsimeet.sources.j2 + dest: /etc/apt/sources.list.d/jitsimeet.sources + when: ansible_distribution_major_version is version('12', '>=') diff --git a/webapps/jitsimeet/tasks/main.yml b/webapps/jitsimeet/tasks/main.yml new file mode 100644 index 00000000..ca29ed2c --- /dev/null +++ b/webapps/jitsimeet/tasks/main.yml @@ -0,0 +1,188 @@ +--- +# tasks file for jitsimeet install + +- name: APT sources + ansible.builtin.include_tasks: apt_sources.yml + +- name: Install system dependencies + ansible.builtin.apt: + name: "{{ jitsimeet_system_dep }}" + state: present + update_cache: true + +- name: Set debconf options for jitsi-meet + ansible.builtin.debconf: + name: "{{ item.name }}" + question: "{{ item.question }}" + value: "{{ item.value }}" + vtype: "{{ item.vtype }}" + loop: + - name: jitsi-videobridge2 + question: jitsi-videobridge/jvb-hostname + value: "{{ jitsimeet_domains | first }}" + vtype: string + - name: jitsi-meet-web-config + question: jitsi-meet/cert-choice + value: "{{ jitsimeet_cert_choice }}" + vtype: string + - name: jitsi-meet-web-config + question: jitsi-meet/cert-path-crt + value: "{{ jitsimeet_ssl_cert_path }}" + vtype: string + - name: jitsi-meet-web-config + question: jitsi-meet/cert-path-key + value: "{{ jitsimeet_ssl_key_path }}" + vtype: string + - name: jitsi-meet-prosody + question: jitsi-meet-prosody/turn-secret + value: "{{ jitsimeet_turn_secret }}" + vtype: string + +- name: Install Jitsi Meet + ansible.builtin.apt: + name: jitsi-meet + state: present + install_recommends: yes + +- name: Install stream module for nginx + ansible.builtin.apt: + name: libnginx-mod-stream + state: present + +- name: Add certs dir for coturn/letsencrypt if needed + ansible.builtin.file: + path: "{{ item.path }}" + state: directory + mode: "{{ item.mode }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" + loop: + - { path: '/etc/coturn', owner: "turnserver", group: "turnserver", mode: "0700" } + - { path: '/etc/coturn/certs', owner: "turnserver", group: "turnserver", mode: "0700" } + - { path: '/etc/letsencrypt/renewal-hooks', owner: "root", group: "root", mode: "0700" } + - { path: '/etc/letsencrypt/renewal-hooks/deploy', owner: "root", group: "root", mode: "0700" } + +- name: Template config files + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" + mode: "{{ item.mode }}" + loop: + - { name: jitsi-videobridge2, src: 'videobridge/jvb.conf.j2', dest: "/etc/jitsi/videobridge/jvb.conf", owner: "jvb", group: "jitsi", mode: "0640" } + - { name: jitsi-videobridge2, src: 'videobridge/sip-communicator.properties.j2', dest: "/etc/jitsi/videobridge/sip-communicator.properties", owner: "jvb", group: "jitsi", mode: "0640" } + - { name: nginx, src: 'meet/config.js.j2', dest: "/etc/jitsi/meet/{{ jitsimeet_domains | first }}-config.js", owner: "root", group: "root", mode: "0644" } + - { name: nginx, src: 'meet/interface_config.js.j2', dest: "/etc/jitsi/meet/{{ jitsimeet_domains | first }}-interface_config.js", owner: "root", group: "root", mode: "0644" } + - { name: nginx, src: 'meet/welcomePageAdditionalContent.html.j2', dest: "/etc/jitsi/meet/welcomePageAdditionalContent.html", owner: "root", group: "root", mode: "0644" } + - { name: prosody, src: 'prosody/virtualhost.cfg.lua.j2', dest: "/etc/prosody/conf.avail/{{ jitsimeet_domains | first }}.cfg.lua", owner: "root", group: "root", mode: "0644" } + - { name: coturn, src: 'coturn/turnserver.conf.j2', dest: "/etc/turnserver.conf", owner: "root", group: "turnserver", mode: "0640" } + - { name: nginx, src: 'certbot/coturn-certbot-deploy.sh.j2', dest: "/etc/letsencrypt/renewal-hooks/deploy/coturn-certbot-deploy.sh", owner: "root", group: "root", mode: "0700" } + register: jitsimeet_all + notify: + - restart jitsimeet_all + +- name: Add bloc to jicofo.conf to disable sctp + ansible.builtin.blockinfile: + path: /etc/jitsi/jicofo/jicofo.conf + marker: "# {mark} ANSIBLE MANAGED BLOCK" + insertafter: 'jicofo {' + block: | + sctp: { + enabled: false + } + notify: restart jicofo + +- name: Unregister default jvb account in prosody + ansible.builtin.command: + cmd: prosodyctl unregister jvb auth.{{ jitsimeet_domains | first }} + notify: + - restart prosody + - restart jicofo + +- name: Register jvb account in prosody (with proper secret) + ansible.builtin.command: + cmd: prosodyctl register jvb auth.{{ jitsimeet_domains | first }} {{ jitsimeet_jvb_secret }} + notify: + - restart prosody + - restart jicofo + +- name: Flush handlers + ansible.builtin.meta: flush_handlers + +- name: Check if SSL certificate is present and register result + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ jitsimeet_domains |first }}/fullchain.pem" + register: jitsimeet_ssl + +- name: Generate certificate only if required (first time) + block: + - name: Template vhost without SSL for successfull LE challengce + ansible.builtin.template: + src: "nginx/vhost.conf.j2" + dest: "/etc/nginx/sites-available/{{ jitsimeet_domains |first }}.conf" + notify: reload nginx + - name: Enable temporary nginx vhost + ansible.builtin.file: + src: "/etc/nginx/sites-available/{{ jitsimeet_domains |first }}.conf" + dest: "/etc/nginx/sites-enabled/{{ jitsimeet_domains |first }}.conf" + state: link + notify: reload nginx + - name: Flush handlers + ansible.builtin.meta: flush_handlers + - name: Make sure /var/lib/letsencrypt exists and has correct permissions + ansible.builtin.file: + path: /var/lib/letsencrypt + state: directory + mode: '0755' + - name: Generate certificate with certbot + ansible.builtin.command: + cmd: certbot certonly --webroot --webroot-path /var/lib/letsencrypt --non-interactive --agree-tos --email {{ jitsimeet_certbot_admin_email }} -d {{ jitsimeet_domains |first }} + when: jitsimeet_ssl.stat.exists != true + +- name: (Re)check if SSL certificate is present and register result + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ jitsimeet_domains |first }}/fullchain.pem" + register: jitsimeet_ssl + +- name: (Re)template conf file for nginx vhost with SSL + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + loop: + - { src: 'nginx/vhost.conf.j2', dest: "/etc/nginx/sites-available/{{ jitsimeet_domains |first }}.conf" } + - { src: 'nginx/multiplex.conf.j2', dest: '/etc/nginx/modules-available/multiplex.conf' } + notify: reload nginx + +- name: Enable multiplex module conf + ansible.builtin.file: + src: '/etc/nginx/modules-available/multiplex.conf' + dest: '/etc/nginx/modules-enabled/multiplex.conf' + state: link + notify: restart nginx + +- name: Enable nginx vhost + ansible.builtin.file: + src: "/etc/nginx/sites-available/{{ jitsimeet_domains |first }}.conf" + dest: "/etc/nginx/sites-enabled/{{ jitsimeet_domains |first }}.conf" + state: link + notify: reload nginx + +- name: Flush handlers + ansible.builtin.meta: flush_handlers + +- name: Check if SSL certificate for coturn is present and register result + ansible.builtin.stat: + path: "/etc/coturn/certs/{{ jitsimeet_turn_domains |first }}.crt" + register: jitsimeet_ssl_coturn + +- name: Generate certificate for coturn with certbot + ansible.builtin.command: + cmd: certbot certonly --webroot --webroot-path /var/lib/letsencrypt --non-interactive --deploy-hook /etc/letsencrypt/renewal-hooks/deploy/coturn-certbot-deploy.sh --agree-tos --email {{ jitsimeet_certbot_admin_email }} -d {{ jitsimeet_turn_domains |first }} + when: jitsimeet_ssl_coturn.stat.exists != true + +- name: Setup other domains if any + include_tasks: other_domains.yml + loop: "{{ jitsimeet_domains[1:] }}" + loop_control: + loop_var: domain diff --git a/webapps/jitsimeet/tasks/other_domains.yml b/webapps/jitsimeet/tasks/other_domains.yml new file mode 100644 index 00000000..59a73cd4 --- /dev/null +++ b/webapps/jitsimeet/tasks/other_domains.yml @@ -0,0 +1,71 @@ +--- +# tasks file for other domains if any + +- name: Template config files + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" + mode: "{{ item.mode }}" + loop: + - { src: 'meet/config.js.j2', dest: "/etc/jitsi/meet/{{ domain }}-config.js", owner: "root", group: "root", mode: "0644" } + - { src: 'meet/interface_config.js.j2', dest: "/etc/jitsi/meet/{{ domain }}-interface_config.js", owner: "root", group: "root", mode: "0644" } + notify: reload nginx + +- name: Check if SSL certificate is present and register result + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ domain }}/fullchain.pem" + register: jitsimeet_ssl + +- name: Generate certificate only if required (first time) + block: + - name: Template vhost without SSL for successfull LE challengce + ansible.builtin.template: + src: "nginx/other.vhost.conf.j2" + dest: "/etc/nginx/sites-available/{{ domain }}.conf" + notify: reload nginx + - name: Enable temporary nginx vhost + ansible.builtin.file: + src: "/etc/nginx/sites-available/{{ domain }}.conf" + dest: "/etc/nginx/sites-enabled/{{ domain }}.conf" + state: link + notify: reload nginx + - name: Flush handlers + ansible.builtin.meta: flush_handlers + - name: Make sure /var/lib/letsencrypt exists and has correct permissions + ansible.builtin.file: + path: /var/lib/letsencrypt + state: directory + mode: '0755' + - name: Generate certificate with certbot + ansible.builtin.command: + cmd: certbot certonly --webroot --webroot-path /var/lib/letsencrypt --non-interactive --agree-tos --email {{ jitsimeet_certbot_admin_email }} -d {{ domain }} + when: jitsimeet_ssl.stat.exists != true + +- name: (Re)check if SSL certificate is present and register result + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ domain }}/fullchain.pem" + register: jitsimeet_ssl + +- name: (Re)template conf file for nginx vhost with SSL + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + loop: + - { src: 'nginx/other.vhost.conf.j2', dest: "/etc/nginx/sites-available/{{ domain }}.conf" } + notify: reload nginx + +- name: Insert block in multiplex.conf + ansible.builtin.lineinfile: + path: /etc/nginx/modules-enabled/multiplex.conf + insertafter: "web_backend;" + line: "{{ domain }} web_backend;" + notify: reload nginx + +- name: Enable nginx vhost + ansible.builtin.file: + src: "/etc/nginx/sites-available/{{ domain }}.conf" + dest: "/etc/nginx/sites-enabled/{{ domain }}.conf" + state: link + notify: reload nginx diff --git a/webapps/jitsimeet/tasks/upgrade.yml b/webapps/jitsimeet/tasks/upgrade.yml new file mode 100644 index 00000000..c1befe48 --- /dev/null +++ b/webapps/jitsimeet/tasks/upgrade.yml @@ -0,0 +1,11 @@ +--- +# tasks file for jitsimeet upgrade +# +# 1. Check what may have changed in release notes and changelogs: +# https://github.com/jitsi/jitsi-meet-release-notes +# https://github.com/jitsi/jitsi-meet/releases +# +# 2. Upgrade Debian packages with these commands (as root): +# apt update +# apt list --upgradeable +# apt install jitsi-meet diff --git a/webapps/jitsimeet/templates/apt/jitsimeet.sources.j2 b/webapps/jitsimeet/templates/apt/jitsimeet.sources.j2 new file mode 100644 index 00000000..9acd6c0d --- /dev/null +++ b/webapps/jitsimeet/templates/apt/jitsimeet.sources.j2 @@ -0,0 +1,8 @@ +# {{ ansible_managed }} + +Types: deb +URIs: https://download.jitsi.org +Suites: stable/ +#Components: main +Signed-by: {{ apt_keyring_dir }}/jitsimeet.gpg +Enabled: yes diff --git a/webapps/jitsimeet/templates/apt/prosody.sources.j2 b/webapps/jitsimeet/templates/apt/prosody.sources.j2 new file mode 100644 index 00000000..15e84be4 --- /dev/null +++ b/webapps/jitsimeet/templates/apt/prosody.sources.j2 @@ -0,0 +1,8 @@ +# {{ ansible_managed }} + +Types: deb +URIs: https://packages.prosody.im/debian +Suites: bookworm +Components: main +Signed-by: {{ apt_keyring_dir }}/prosody.gpg +Enabled: yes diff --git a/webapps/jitsimeet/templates/certbot/coturn-certbot-deploy.sh.j2 b/webapps/jitsimeet/templates/certbot/coturn-certbot-deploy.sh.j2 new file mode 100644 index 00000000..1985490f --- /dev/null +++ b/webapps/jitsimeet/templates/certbot/coturn-certbot-deploy.sh.j2 @@ -0,0 +1,30 @@ +#!/bin/sh + +# https://serverfault.com/questions/849683/how-to-setup-coturn-with-letsencrypt + +set -e + +for domain in $RENEWED_DOMAINS; do + case $domain in + {{ jitsimeet_turn_domains | first }}) + daemon_cert_root=/etc/coturn/certs + + # Make sure the certificate and private key files are + # never world readable, even just for an instant while + # we're copying them into daemon_cert_root. + umask 077 + + cp "$RENEWED_LINEAGE/fullchain.pem" "$daemon_cert_root/$domain.crt" + cp "$RENEWED_LINEAGE/privkey.pem" "$daemon_cert_root/$domain.key" + + # Apply the proper file ownership and permissions for + # the daemon to read its certificate and key. + chown turnserver "$daemon_cert_root/$domain.crt" \ + "$daemon_cert_root/$domain.key" + chmod 400 "$daemon_cert_root/$domain.crt" \ + "$daemon_cert_root/$domain.key" + + service coturn restart >/dev/null + ;; + esac +done diff --git a/webapps/jitsimeet/templates/coturn/turnserver.conf.j2 b/webapps/jitsimeet/templates/coturn/turnserver.conf.j2 new file mode 100644 index 00000000..574635aa --- /dev/null +++ b/webapps/jitsimeet/templates/coturn/turnserver.conf.j2 @@ -0,0 +1,46 @@ +# jitsi-meet coturn config. Do not modify this line +use-auth-secret +keep-address-family +static-auth-secret={{ jitsimeet_turn_secret }} +realm={{ jitsimeet_turn_domains | first }} +cert=/etc/coturn/certs/{{ jitsimeet_turn_domains | first }}.crt +pkey=/etc/coturn/certs/{{ jitsimeet_turn_domains | first }}.key +no-multicast-peers +no-cli +#no-loopback-peers +no-tcp-relay +no-tcp +listening-port=3478 +tls-listening-port=5349 +no-tlsv1 +no-tlsv1_1 +# https://ssl-config.mozilla.org/#server=haproxy&version=2.1&config=intermediate&openssl=1.1.0g&guideline=5.4 +cipher-list=ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 +# without it there are errors when running on Ubuntu 20.04 +#dh2066 +# jitsi-meet coturn relay disable config. Do not modify this line +denied-peer-ip=0.0.0.0-0.255.255.255 +denied-peer-ip=10.0.0.0-10.255.255.255 +denied-peer-ip=100.64.0.0-100.127.255.255 +denied-peer-ip=127.0.0.0-127.255.255.255 +denied-peer-ip=169.254.0.0-169.254.255.255 +denied-peer-ip=127.0.0.0-127.255.255.255 +denied-peer-ip=172.16.0.0-172.31.255.255 +denied-peer-ip=192.0.0.0-192.0.0.255 +denied-peer-ip=192.0.2.0-192.0.2.255 +denied-peer-ip=192.88.99.0-192.88.99.255 +denied-peer-ip=192.168.0.0-192.168.255.255 +denied-peer-ip=198.18.0.0-198.19.255.255 +denied-peer-ip=198.51.100.0-198.51.100.255 +denied-peer-ip=203.0.113.0-203.0.113.255 +denied-peer-ip=240.0.0.0-255.255.255.255 +denied-peer-ip=::1 +denied-peer-ip=64:ff9b::-64:ff9b::ffff:ffff +denied-peer-ip=::ffff:0.0.0.0-::ffff:255.255.255.255 +denied-peer-ip=100::-100::ffff:ffff:ffff:ffff +denied-peer-ip=2001::-2001:1ff:ffff:ffff:ffff:ffff:ffff:ffff +denied-peer-ip=2002::-2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff +denied-peer-ip=fc00::-fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff +denied-peer-ip=fe80::-febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff +syslog + diff --git a/webapps/jitsimeet/templates/meet/config.js.j2 b/webapps/jitsimeet/templates/meet/config.js.j2 new file mode 100644 index 00000000..9e50c6bd --- /dev/null +++ b/webapps/jitsimeet/templates/meet/config.js.j2 @@ -0,0 +1,1598 @@ +/* eslint-disable comma-dangle, no-unused-vars, no-var, prefer-template, vars-on-top */ + +/* + * NOTE: If you add a new option please remember to document it here: + * https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-configuration + */ + +var subdir = ''; +var subdomain = ''; + +if (subdomain) { + subdomain = subdomain.substr(0, subdomain.length - 1).split('.') + .join('_') + .toLowerCase() + '.'; +} + +// In case of no ssi provided by the webserver, use empty strings +if (subdir.startsWith('