2016-10-18 20:20:59 +00:00
|
|
|
local domain = os.getenv("DOMAIN")
|
2020-06-01 05:25:31 +00:00
|
|
|
local domain_http_upload = os.getenv("DOMAIN_HTTP_UPLOAD")
|
|
|
|
local domain_muc = os.getenv("DOMAIN_MUC")
|
|
|
|
local domain_proxy = os.getenv("DOMAIN_PROXY")
|
2020-06-05 05:53:52 +00:00
|
|
|
local domain_pubsub = os.getenv("DOMAIN_PUBSUB")
|
2016-10-18 20:20:59 +00:00
|
|
|
|
2020-07-08 14:06:05 +00:00
|
|
|
-- XEP-0368: SRV records for XMPP over TLS
|
|
|
|
-- https://compliance.conversations.im/test/xep0368/
|
2024-02-20 17:52:34 +00:00
|
|
|
c2s_direct_tls_ssl = {
|
2020-06-01 09:10:19 +00:00
|
|
|
certificate = "certs/" .. domain .. "/fullchain.pem";
|
|
|
|
key = "certs/" .. domain .. "/privkey.pem";
|
2016-10-18 20:20:59 +00:00
|
|
|
}
|
2024-02-20 17:52:34 +00:00
|
|
|
c2s_direct_tls_ports = { 5223 }
|
2020-06-01 09:10:19 +00:00
|
|
|
|
2020-07-08 14:06:05 +00:00
|
|
|
-- https://prosody.im/doc/certificates#service_certificates
|
|
|
|
-- https://prosody.im/doc/ports#ssl_configuration
|
|
|
|
https_ssl = {
|
|
|
|
certificate = "certs/" .. domain_http_upload .. "/fullchain.pem";
|
|
|
|
key = "certs/" .. domain_http_upload .. "/privkey.pem";
|
|
|
|
}
|
|
|
|
|
2016-10-18 20:20:59 +00:00
|
|
|
VirtualHost (domain)
|
2023-09-07 15:48:56 +00:00
|
|
|
disco_items = {
|
|
|
|
{ domain_http_upload },
|
|
|
|
}
|
2016-10-18 20:20:59 +00:00
|
|
|
|
|
|
|
-- Set up a http file upload because proxy65 is not working in muc
|
2023-09-14 18:02:00 +00:00
|
|
|
Component (domain_http_upload) "http_file_share"
|
|
|
|
http_file_share_expires_after = 60 * 60 * 24 * 7 -- a week in seconds
|
|
|
|
local size_limit = os.getenv("HTTP_FILE_SHARE_SIZE_LIMIT") or 10 * 1024 * 1024 -- Default is 10MB
|
|
|
|
http_file_share_size_limit = size_limit
|
|
|
|
http_file_share_daily_quota = os.getenv("HTTP_FILE_SHARE_DAILY_QUOTA") or 10 * size_limit -- Default is 10x the size limit
|
2018-01-14 00:11:38 +00:00
|
|
|
|
2020-06-01 05:25:31 +00:00
|
|
|
Component (domain_muc) "muc"
|
2018-01-14 00:11:38 +00:00
|
|
|
name = "Prosody Chatrooms"
|
|
|
|
restrict_room_creation = false
|
|
|
|
max_history_messages = 20
|
2018-11-27 19:33:37 +00:00
|
|
|
modules_enabled = {
|
2020-05-31 09:24:31 +00:00
|
|
|
"muc_mam",
|
|
|
|
"vcard_muc"
|
2018-11-27 19:33:37 +00:00
|
|
|
}
|
2020-06-01 05:25:31 +00:00
|
|
|
|
|
|
|
-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers
|
|
|
|
Component (domain_proxy) "proxy65"
|
|
|
|
proxy65_address = domain_proxy
|
|
|
|
proxy65_acl = { domain }
|
2020-06-05 05:53:52 +00:00
|
|
|
|
|
|
|
-- Implements a XEP-0060 pubsub service.
|
|
|
|
Component (domain_pubsub) "pubsub"
|