This commit is contained in:
2024-03-01 13:06:06 +01:00
parent 6ae2c3eb5f
commit d8d9fd9e67
15 changed files with 148 additions and 140 deletions
+18 -2
View File
@@ -1,6 +1,7 @@
plugin_paths = { "/usr/local/lib/prosody/custom-modules/" };
modules_enabled = {
-- table of enabled modules
local mods_enabled = {
-- Generally required
"roster"; -- Allow users to have a roster. Recommended ;)
"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
@@ -32,7 +33,7 @@ modules_enabled = {
--"admin_telnet"; -- Opens telnet console interface on localhost port 5582
-- HTTP modules
--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
--"http_files"; -- Serve static files from a directory over HTTP
-- Other specific functionality
@@ -47,6 +48,20 @@ modules_enabled = {
"server_contact_info"; -- This module lets you advertise various contact addresses for your XMPP service via XEP-0157.
};
local enabled = os.getenv("ENABLE_FIREWALL") or "false"
local spam_blocklist = os.getenv("SPAM_BLOCKLIST") and "/usr/local/etc/prosody/firewall/" .. os.getenv("SPAM_BLOCKLIST") or "module:scripts/spam-blocklists.pfw"
if(enabled == "true")
then
table.insert(mods_enabled, "firewall");
firewall_scripts = {
spam_blocklist;
}
end
modules_enabled = mods_enabled;
-- These modules are auto-loaded, but should you want
-- to disable them then uncomment them here:
modules_disabled = {
@@ -54,3 +69,4 @@ modules_disabled = {
-- "c2s"; -- Handle client connections
-- "s2s"; -- Handle server-to-server connections
};