Commit 894dbac3 authored by Michael Fürmann's avatar Michael Fürmann

Optimized prosody configuration for full conversations.im feature...

Optimized prosody configuration for full conversations.im feature compartibility including full OMEMO support
parent 130e30de
......@@ -237,7 +237,7 @@ $conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, websocket, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
?>
......@@ -237,6 +237,6 @@ $conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, websocket, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
?>
......@@ -237,7 +237,7 @@ $conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, websocket, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
?>
......@@ -237,7 +237,7 @@ $conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, websocket, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
?>
......@@ -233,7 +233,7 @@ $conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, websocket, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access';
?>
......@@ -1768,7 +1768,7 @@ class installer_base {
$ssl_domain = $this->free_query('Common Name (e.g. server FQDN or YOUR name)', $conf['hostname'],'ssl_cert_common_name');
$ssl_email = $this->free_query('Email Address', 'hostmaster@'.$conf['hostname'],'ssl_cert_email');
$tpl = new tpl('xmpp_metronome_conf_ssl.master');
$tpl = new tpl('xmpp_conf_ssl.master');
$tpl->setVar('ssl_country',$ssl_country);
$tpl->setVar('ssl_locality',$ssl_locality);
$tpl->setVar('ssl_organisation',$ssl_organisation);
......
......@@ -158,7 +158,7 @@ xmpp_daemon=prosody
xmpp_use_ispv6=n
xmpp_bosh_max_inactivity=30
xmpp_server_admins=
xmpp_modules_enabled=saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons
xmpp_modules_enabled=roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence, smacks, csi_battery_saver, pep_vcard_avatar, omemo_all_access
xmpp_port_http=5290
xmpp_port_https=5291
xmpp_port_pastebin=5292
......
......@@ -3,10 +3,11 @@ plugin_paths = {
};
use_libevent = true;
log = {
-- debug = "/var/log/prosody/prosody.dbg",
info = "/var/log/prosody/prosody.log",
error = "/var/log/prosody/prosody.err",
"syslog",
-- optional: uncomment debug log here
-- debug = "/var/log/prosody/prosody.dbg",
info = "/var/log/prosody/prosody.log",
error = "/var/log/prosody/prosody.err",
"syslog",
};
use_ipv6 = true;
http_ports = {
......@@ -55,7 +56,6 @@ modules_enabled = {
"csi_battery_saver",
"pep_vcard_avatar",
"omemo_all_access",
};
modules_disabled = {
};
......@@ -87,5 +87,8 @@ ssl = {
certificate = "/etc/prosody/certs/localhost.crt",
};
VirtualHost "{tmpl_var main_host}"
certificate = "/etc/prosody/certs/localhost.crt"
Component "{tmpl_var main_host}" "http_upload"
ud_disco_name = "HTTP File Upload";
http_upload_file_size_limit = 1024 * 1024 * 10;
http_upload_quota = 1024 * 1024 * 10;
http_upload_expire_after = 60 * 60 * 24 * 2;
\ No newline at end of file
Include "/etc/prosody/storage.cfg.lua"
Include "/etc/prosody/global.cfg.lua"
Include "/etc/prosody/hosts/*.lua"
Include "/etc/prosody/status/*.lua"
......@@ -416,8 +416,6 @@ class page_action extends tform_actions {
$required_hosts[] = 'vjud';
if($rec['use_muc_host']=='y')
$required_hosts[] = 'muc';
if($rec['use_http_upload']=='y')
$required_hosts[] = 'upload';
// purge old rr-record
$sql = "SELECT * FROM dns_rr WHERE zone = ? AND (name IN ? AND type = 'CNAME' OR name LIKE ? AND type = 'SRV') AND " . $app->tform->getAuthSQL('r') . " ORDER BY serial DESC";
......
......@@ -69,8 +69,4 @@ otherName.12= SRVName;IA5STRING:_xmpp-server.proxy.{tmpl_var name='domain'}
DNS.6 = vjud.{tmpl_var name='domain'}
otherName.13= xmppAddr;FORMAT:UTF8,UTF8:vjud.{tmpl_var name='domain'}
otherName.14= SRVName;IA5STRING:_xmpp-server.vjud.{tmpl_var name='domain'}
DNS.7 = upload.{tmpl_var name='domain'}
otherName.15= xmppAddr;FORMAT:UTF8,UTF8:upload.{tmpl_var name='domain'}
otherName.16= SRVName;IA5STRING:_xmpp-server.upload.{tmpl_var name='domain'}
\ No newline at end of file
otherName.14= SRVName;IA5STRING:_xmpp-server.vjud.{tmpl_var name='domain'}
\ No newline at end of file
......@@ -3,10 +3,11 @@ plugin_paths = {
};
use_libevent = true;
log = {
-- debug = "/var/log/prosody/prosody.dbg",
info = "/var/log/prosody/prosody.log",
error = "/var/log/prosody/prosody.err",
"syslog",
-- optional: uncomment debug log here
-- debug = "/var/log/prosody/prosody.dbg",
info = "/var/log/prosody/prosody.log",
error = "/var/log/prosody/prosody.err",
"syslog",
};
use_ipv6 = {tmpl_var name='ipv6'};
http_ports = {
......@@ -57,5 +58,3 @@ ssl = {
certificate = "/etc/prosody/certs/localhost.crt",
};
VirtualHost "{tmpl_var main_host}"
certificate = "/etc/prosody/certs/localhost.crt"
......@@ -3,10 +3,12 @@ VirtualHost "{tmpl_var name='domain'}"
authentication = "external";
external_auth_command = "/usr/local/lib/prosody/auth/authenticate_isp.sh";
allow_registration = {tmpl_var name='public_registration'};
<tmpl_if name='registration_url' op='!=' value=''>
<tmpl_if name='registration_url' op='!=' value=''>
registration_url = "{tmpl_var name='registration_url'}";
</tmpl_if>
<tmpl_if name='registration_message' op='!=' value=''>
registration_text = "{tmpl_var name='registration_message'}";
</tmpl_if>
</tmpl_if>
no_registration_whitelist = true;
modules_enabled = {
......@@ -21,8 +23,19 @@ VirtualHost "{tmpl_var name='domain'}"
"register_redirect",
</tmpl_if>
"admin_adhoc",
"http",
<tmpl_if name='use_status_host' op='==' value='true'>
"server_status",
</tmpl_if>
<tmpl_if name='use_webpresence' op='==' value='true'>
"webpresence"
</tmpl_if>
};
disco_items = {
{
"{tmpl_var main_host}",
"HTTP File Upload",
},
<tmpl_if name='use_muc' op='==' value='true'>
{
"muc.{tmpl_var name='domain'}",
......@@ -46,15 +59,8 @@ VirtualHost "{tmpl_var name='domain'}"
"vjud.{tmpl_var name='domain'}",
"{tmpl_var name='domain'} User Directory",
},
</tmpl_if>
<tmpl_if name='use_http_upload' op='==' value='true'>
{
"upload.{tmpl_var name='domain'}",
"{tmpl_var name='domain'} HTTP File Upload",
}
</tmpl_if>
};
admins = {
{tmpl_var name='domain_admins'}
};
......@@ -65,6 +71,32 @@ VirtualHost "{tmpl_var name='domain'}"
};
</tmpl_if>
http_host = 'xmpp.{tmpl_var name='domain'}';
<tmpl_if name='use_status_host' op='==' value='true'>
server_status_basepath = "/xmppd/";
server_status_json = true;
server_status_shown_hosts = {
"{tmpl_var name='domain'}",
<tmpl_if name='use_anon_host' op='==' value='true'>
"anon.fuermann.net",
</tmpl_if>
};
server_status_shown_comps = {
<tmpl_if name='use_pubsub' op='==' value='true'>
"pubsub.{tmpl_var name='domain'}",
</tmpl_if>
<tmpl_if name='use_proxy' op='==' value='true'>
"proxy.{tmpl_var name='domain'}",
</tmpl_if>
<tmpl_if name='use_vjud' op='==' value='true'>
"vjud.{tmpl_var name='domain'}",
</tmpl_if>
<tmpl_if name='use_muc' op='==' value='true'>
"muc.{tmpl_var name='domain'}",
</tmpl_if>
}
</tmpl_if>
<tmpl_if name='use_muc' op='==' value='true'>
Component "muc.{tmpl_var name='domain'}" "muc"
modules_enabled = {
......@@ -123,15 +155,6 @@ Component "vjud.{tmpl_var name='domain'}" "vjud"
vjud_mode = "{tmpl_var name='vjud_opt_mode'}";
</tmpl_if>
<tmpl_if name='use_http_upload' op='==' value='true'>
Component "upload.{tmpl_var name='domain'}" "http_upload"
ud_disco_name = "{tmpl_var name='domain'} HTTP File Upload";
http_upload_file_size_limit = 1024 * 1024 * 10 -- 10MB, maximum
http_upload_quota = 1024 * 1024 * 10 -- 10MB quota per user
http_upload_expire_after = 60 * 60 * 24 * 2 -- 2 days in seconds
</tmpl_if>
<tmpl_if name='use_anon_host' op='==' value='true'>
VirtualHost "anon.{tmpl_var name='domain'}"
enabled = true;
......
......@@ -152,6 +152,7 @@ class xmpp_plugin {
// Create main host file
$tpl = new tpl();
$tpl->newTemplate("xmpp_{$this->daemon}_conf_host.master");
$tpl->setVar('main_host', $conf['serverconfig']['server']['hostname']);
$tpl->setVar('domain', $data['new']['domain']);
$tpl->setVar('active', $data['new']['active'] == 'y' ? 'true' : 'false');
$tpl->setVar('public_registration', $data['new']['public_registration'] == 'y' ? 'true' : 'false');
......@@ -166,6 +167,8 @@ class xmpp_plugin {
$tpl->setVar('domain_admins', "\t\t\"".implode("\",\n\t\t\"",$admins)."\"\n");
// Enable / Disable features
$tpl->setVar('use_status_host', $data['new']['use_status_host'] == 'y' ? 'true' : 'false');
$tpl->setVar('use_webpresence', $data['new']['use_webpresence'] == 'y' ? 'true' : 'false');
if($data['new']['use_pubsub']=='y'){
$tpl->setVar('use_pubsub', 'true');
$status_comps[] = 'pubsub.'.$data['new']['domain'];
......@@ -237,26 +240,26 @@ class xmpp_plugin {
unset($tpl);
// Create http host file
$tpl = new tpl;
$tpl->newTemplate("xmpp_{$this->daemon}_conf_status.master");
$tpl->setVar('domain', $data['new']['domain']);
$httpMods = 0;
$tpl->setVar('use_webpresence', $data['new']['use_webpresence'] == 'y' ? 'true' : 'false');
if($data['new']['use_webpresence']=='y') {
$httpMods++;
}
$tpl->setVar('use_status_host', $data['new']['use_status_host'] == 'y' ? 'true' : 'false');
if($data['new']['use_status_host']=='y'){
$httpMods++;
$tpl->setVar('status_hosts', "\t\t\"".implode("\",\n\t\t\"",$status_hosts)."\"\n");
$tpl->setVar('status_comps', "\t\t\"".implode("\",\n\t\t\"",$status_comps)."\"\n");
}
if($httpMods > 0){
$app->system->file_put_contents($this->xmpp_config_dir.'/status/'.$data['new']['domain'].'.cfg.lua', $tpl->grab());
} else {
unlink($this->xmpp_config_dir.'/status/'.$data['new']['domain'].'.cfg.lua');
}
unset($tpl);
//$tpl = new tpl;
//$tpl->newTemplate("xmpp_{$this->daemon}_conf_status.master");
//$tpl->setVar('domain', $data['new']['domain']);
//$httpMods = 0;
//$tpl->setVar('use_webpresence', $data['new']['use_webpresence'] == 'y' ? 'true' : 'false');
//if($data['new']['use_webpresence']=='y') {
// $httpMods++;
//}
//$tpl->setVar('use_status_host', $data['new']['use_status_host'] == 'y' ? 'true' : 'false');
//if($data['new']['use_status_host']=='y'){
// $httpMods++;
// $tpl->setVar('status_hosts', "\t\t\"".implode("\",\n\t\t\"",$status_hosts)."\"\n");
// $tpl->setVar('status_comps', "\t\t\"".implode("\",\n\t\t\"",$status_comps)."\"\n");
//}
//if($httpMods > 0){
// $app->system->file_put_contents($this->xmpp_config_dir.'/status/'.$data['new']['domain'].'.cfg.lua', $tpl->grab());
//} else {
// unlink($this->xmpp_config_dir.'/status/'.$data['new']['domain'].'.cfg.lua');
//}
//unset($tpl);
$app->services->restartServiceDelayed('xmpp', 'reload');
}
......@@ -361,7 +364,7 @@ class xmpp_plugin {
// Write new CNF file
$tpl = new tpl();
$tpl->newTemplate('xmpp_metronome_conf_ssl.master');
$tpl->newTemplate('xmpp_conf_ssl.master');
$tpl->setVar('domain', $domain);
$tpl->setVar('ssl_country', $data['new']['ssl_country']);
$tpl->setVar('ssl_locality', $data['new']['ssl_locality']);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment