diff options
Diffstat (limited to 'files')
| -rw-r--r-- | files/nginx_conf.j2 | 59 | ||||
| -rw-r--r-- | files/prosody.cfg.lua.j2 | 165 | ||||
| -rw-r--r-- | files/turnserver.conf.j2 | 12 | ||||
| -rw-r--r-- | files/virtual_host.cfg.lua.j2 | 107 |
4 files changed, 0 insertions, 343 deletions
diff --git a/files/nginx_conf.j2 b/files/nginx_conf.j2 deleted file mode 100644 index 29cd59d..0000000 --- a/files/nginx_conf.j2 +++ /dev/null @@ -1,59 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev> -# -# SPDX-License-Identifier: AGPL-3.0-or-later - -server { - listen 443 ssl; - listen [::]:443 ssl; - - ssl_certificate /etc/prosody/certs/{{ virtual_host }}.crt; - ssl_certificate_key /etc/prosody/certs/{{ virtual_host }}.key; - - server_name chat.{{ virtual_host }}; - - location / { - proxy_pass https://localhost:5281; - proxy_set_header Host "chat.{{ virtual_host }}"; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_buffering off; - tcp_nodelay on; - } -} - -server { - listen 80; - listen [::]:80; - - server_name chat.{{ virtual_host }}; - - return 301 https://$host$request_uri; -} - -server { - listen 443 ssl; - listen [::]:443 ssl; - - ssl_certificate /etc/prosody/certs/{{ virtual_host }}.crt; - ssl_certificate_key /etc/prosody/certs/{{ virtual_host }}.key; - - server_name {{ virtual_host }}; - - location / { - proxy_pass https://localhost:5281; - proxy_set_header Host "{{ virtual_host }}"; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_buffering off; - tcp_nodelay on; - } -} - -server { - listen 80; - listen [::]:80; - - server_name {{ virtual_host }}; - - return 301 https://$host$request_uri; -} diff --git a/files/prosody.cfg.lua.j2 b/files/prosody.cfg.lua.j2 deleted file mode 100644 index 4b79a82..0000000 --- a/files/prosody.cfg.lua.j2 +++ /dev/null @@ -1,165 +0,0 @@ --- SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev> --- --- SPDX-License-Identifier: AGPL-3.0-or-later - -plugin_paths = { - "/usr/local/lib/prosody/modules" -} - -modules_enabled = { - - -- Core - "account_activity"; - "admin_adhoc"; - "admin_shell"; - "blocklist"; - "bookmarks"; - "bosh"; - "carbons"; - "cloud_notify"; - "csi_battery_saver"; - "disco"; - "external_services"; - "lastactivity"; - "lastlog2"; - "limits"; - "mam"; - "measure_active_users"; - "mimicking"; - "pep"; - "ping"; - "private"; - "roster"; - "sasl2"; - "sasl2_bind2"; - "sasl2_fast"; - "sasl2_sm"; - "sasl_ssdp"; - "saslauth"; - "server_contact_info"; - "server_info"; - "smacks"; - "stanza_debug"; - "time"; - "tls"; - "uptime"; - "vcard4"; - "vcard_legacy"; - "version"; - "websocket"; - -{% if not is_transport_server %} - -- Invites - "http"; - "http_libjs"; -{% endif %} - -{% if not is_transport_server %} - -- Turn - "turn_external"; -{% endif %} - -{% if not is_transport_server %} - -- Spam - "anti_spam"; - "report_forward"; - "spam_reporting"; - "watch_spam_reports"; -{% endif %} - -{% if not is_transport_server %} - -- S2S - "s2s_auth_dane_in"; - "s2s_bidi"; -{% endif %} - -{% if is_transport_server %} - -- Privileged components - "privilege"; -{% endif %} - -} - -modules_disabled = { - -{% if is_transport_server %} - "s2s"; -{% endif %} - -} - -pidfile = "/run/prosody/prosody.pid"; - -log = { - info = "/var/log/prosody/prosody.log"; - error = "/var/log/prosody/prosody.err"; - { - levels = { - "error" - }; - to = "syslog"; - }; -} - -{% if not is_transport_server %} -s2s_secure_auth = true -{% endif %} - -c2s_direct_tls_ports = { - 5223 -} - -{% if not is_transport_server %} -s2s_direct_tls_ports = { - 5270 -} -use_dane = true -{% endif %} - -{% if not is_transport_server %} -anti_spam_services = { - "xmppbl.org" -} -report_forward_to = { - "submit@reports.xmppbl.org"; -} -{% endif %} - -{% if not is_transport_server %} -turn_external_host = "{{ turn_server }}" -turn_external_secret = "{{ turn_secret }}" -{% endif %} - --- From Monal considerations for XMPP server admins -smacks_hibernation_time = 86400 - -{% if not is_transport_server %} -allow_registration = true -registration_invite_only = true -{% endif %} - -{% if not is_transport_server %} -firewall_scripts = { - "module:scripts/spam-blocking.pfw"; - "module:script/spam-blocklists.pfw"; -} -{% endif %} - -limits = { - c2s = { - rate = "10kb/s"; - }; - s2sin = { - rate = "30kb/s"; - }; -} - -storage = "sql" -sql = { - driver = "PostgreSQL"; - database = "prosody"; - username = "prosody"; - password = "{{ postgres_password }}"; -} - -Include "conf.d/*.cfg.lua" diff --git a/files/turnserver.conf.j2 b/files/turnserver.conf.j2 deleted file mode 100644 index de158d2..0000000 --- a/files/turnserver.conf.j2 +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev> -# -# SPDX-License-Identifier: AGPL-3.0-or-later - -syslog -no-rfc5780 -no-stun-backward-compatibility -response-origin-only-with-rfc5780 -realm={{ turn_server }} -use-auth-secret -static-auth-secret={{ turn_secret }} -external-ip={{ ipv4 }} diff --git a/files/virtual_host.cfg.lua.j2 b/files/virtual_host.cfg.lua.j2 deleted file mode 100644 index 389e98e..0000000 --- a/files/virtual_host.cfg.lua.j2 +++ /dev/null @@ -1,107 +0,0 @@ --- SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev> --- --- SPDX-License-Identifier: AGPL-3.0-or-later - -VirtualHost "{{ virtual_host }}" - -admins = { -{% for admin in admins %} - "{{ admin }}" -{% endfor %} -} - -modules_enabled = { - - -- Core - "groups"; - -{% if not is_transport_server %} - -- Invites - "invites"; - "invites_adhoc"; - "invites_api"; - "invites_page"; - "invites_register"; - "invites_register_web"; - "invites_tracking"; - "register"; - "register_apps"; -{% endif %} - -} - -{% if not is_transport_server %} -site_apps_show = { - "conversations"; - "dino"; - "gajim"; - "monal"; -} -{% endif %} - -{% if not is_transport_server %} -allow_user_invites = true -site_name = "{{ virtual_host }}" -{% endif %} - -privileged_entities = { -{% for transport in transports | default([]) %} - ["{{ transport.subdomain }}.{{ virtual_host }}"] = { - roster = "both"; - message = "outgoing"; - iq = { - ["http://jabber.org/protocol/pubsub"] = "both"; - ["http://jabber.org/protocol/pubsub#owner"] = "set"; - }; - }; -{% endfor %} -} - -Component "upload.{{ virtual_host }}" "http_file_share" -http_file_share_size_limit = 300 * 1024 * 1024 -http_file_share_global_quota = 5 * 1024 * 1024 * 1024 - -{% if is_transport_server %} -http_file_share_access = { -{% for transport in transports | default([]) %} - "{{ transport.subdomain }}.{{ virtual_host }}"; -{% endfor %} -} -{% endif %} - -Component "proxy.{{ virtual_host }}" "proxy65" - -proxy65_address = "chat.{{ virtual_host }}" - -modules_disabled = { - "s2s"; -} - -Component "conference.{{ virtual_host }}" "muc" -modules_enabled = { - "muc"; - "muc_mam"; - - -- Spam -{% if not is_transport_server %} - "muc_moderation"; - "muc_rtbl"; -{% endif %} -} - -log_all_rooms = true -restrict_room_creation = "local" -muc_room_default_public = false -muc_room_default_public_jids = true - -{% if not is_transport_server %} -muc_rtbl_jid = "xmppbl.org" -{% endif %} - -{% for transport in transports | default([]) %} -Component "{{ transport.subdomain }}.{{ virtual_host }}" -component_secret = "{{ transport.secret }}" -modules_enabled = { - "privilege"; -} -{% endfor %} |
