diff --git a/install/dist/conf/debian60.conf.php b/install/dist/conf/debian60.conf.php index 26b8016b511ae4ee3f9458abdd7a791ab5d103a1..01c275bd59d815681d34153f2bc3a2e1248c3072 100644 --- a/install/dist/conf/debian60.conf.php +++ b/install/dist/conf/debian60.conf.php @@ -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'; ?> diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php index c1f877ac7f0a1cac7322d348382212608f9af9a9..58aeff24364427510b3e00151b8140b0e3872c4c 100644 --- a/install/dist/conf/debian90.conf.php +++ b/install/dist/conf/debian90.conf.php @@ -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'; ?> diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php index 52114d20767f2c215585ca07264cd10120b306bc..4ad9b17325b5d002e29588dc6d38fd69b22782c0 100644 --- a/install/dist/conf/debiantesting.conf.php +++ b/install/dist/conf/debiantesting.conf.php @@ -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'; ?> diff --git a/install/dist/conf/ubuntu1604.conf.php b/install/dist/conf/ubuntu1604.conf.php index d4ba8fb8b57e1f58a04b7c8f0377a89afb707fcc..6159638d0f99f86276be590aa2fc6c3218d07de1 100644 --- a/install/dist/conf/ubuntu1604.conf.php +++ b/install/dist/conf/ubuntu1604.conf.php @@ -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'; ?> diff --git a/install/dist/conf/ubuntu1710.conf.php b/install/dist/conf/ubuntu1710.conf.php index 3d492a583756385c985d81a1ca19d13e4ce93245..e04f4116ff21711167e67bb57b86fbf29ce9461a 100644 --- a/install/dist/conf/ubuntu1710.conf.php +++ b/install/dist/conf/ubuntu1710.conf.php @@ -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'; ?> diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0c3300e95d2e1b9d8b8c75d027dd36db50cb25a3..c2b583a4fed827b429e9dbe4ea68936db8a5957b 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -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); diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 163e4c13fd555c8c26256a389973a824a982ecb2..48989ad6f18ab451d005dbe2ec5616d43662ae87 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -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 diff --git a/install/tpl/xmpp_prosody_conf_global.master b/install/tpl/xmpp_prosody_conf_global.master index c8b8e5d8d658973ee1e61c8ce8ad2f647d41aacf..14a0ae970295b4c5bb25993bce2f3ecd6dc7f3d6 100644 --- a/install/tpl/xmpp_prosody_conf_global.master +++ b/install/tpl/xmpp_prosody_conf_global.master @@ -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 diff --git a/install/tpl/xmpp_prosody_conf_main.master b/install/tpl/xmpp_prosody_conf_main.master index 6eaf33f88dde7124d5d2c86943cf79d59fd31a90..9c57f3292e292645bd4f1bd9b6184ddbc80e08c0 100644 --- a/install/tpl/xmpp_prosody_conf_main.master +++ b/install/tpl/xmpp_prosody_conf_main.master @@ -1,4 +1,3 @@ Include "/etc/prosody/storage.cfg.lua" Include "/etc/prosody/global.cfg.lua" Include "/etc/prosody/hosts/*.lua" -Include "/etc/prosody/status/*.lua" diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 8eab9cb251c9107b6146499376b084e50f5dd24e..aff4c292326642a874f75d063c8ea00dc3204f5f 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -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"; diff --git a/server/conf/xmpp_metronome_conf_ssl.master b/server/conf/xmpp_conf_ssl.master similarity index 91% rename from server/conf/xmpp_metronome_conf_ssl.master rename to server/conf/xmpp_conf_ssl.master index 08d9f14ea733e6ce83b5771195156e9653ceaaad..73ab3a8a3580313f9879c5e50ccd6a01c6e71547 100644 --- a/server/conf/xmpp_metronome_conf_ssl.master +++ b/server/conf/xmpp_conf_ssl.master @@ -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 diff --git a/server/conf/xmpp_prosody_conf_global.master b/server/conf/xmpp_prosody_conf_global.master index 86e3846484cb9ca41e5b247d90cc498fe441308d..ded6f753c6964f9c1056c190d785572dc157d596 100644 --- a/server/conf/xmpp_prosody_conf_global.master +++ b/server/conf/xmpp_prosody_conf_global.master @@ -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" diff --git a/server/conf/xmpp_prosody_conf_host.master b/server/conf/xmpp_prosody_conf_host.master index 7e2166502c7565ffd105e8f31d28188b9c71b3c6..b45e955eb4a1e8f307787a2bb8e3f855f359ec81 100644 --- a/server/conf/xmpp_prosody_conf_host.master +++ b/server/conf/xmpp_prosody_conf_host.master @@ -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'}; - + registration_url = "{tmpl_var name='registration_url'}"; + + registration_text = "{tmpl_var name='registration_message'}"; - + no_registration_whitelist = true; modules_enabled = { @@ -21,8 +23,19 @@ VirtualHost "{tmpl_var name='domain'}" "register_redirect", "admin_adhoc", + "http", + + "server_status", + + + "webpresence" + }; disco_items = { + { + "{tmpl_var main_host}", + "HTTP File Upload", + }, { "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", }, - - - { - "upload.{tmpl_var name='domain'}", - "{tmpl_var name='domain'} HTTP File Upload", - } }; - admins = { {tmpl_var name='domain_admins'} }; @@ -65,6 +71,32 @@ VirtualHost "{tmpl_var name='domain'}" }; + http_host = 'xmpp.{tmpl_var name='domain'}'; + + server_status_basepath = "/xmppd/"; + server_status_json = true; + server_status_shown_hosts = { + "{tmpl_var name='domain'}", + + "anon.fuermann.net", + + }; + server_status_shown_comps = { + + "pubsub.{tmpl_var name='domain'}", + + + "proxy.{tmpl_var name='domain'}", + + + "vjud.{tmpl_var name='domain'}", + + + "muc.{tmpl_var name='domain'}", + + } + + 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'}"; - -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 - - - VirtualHost "anon.{tmpl_var name='domain'}" enabled = true; diff --git a/server/plugins-available/xmpp_plugin.inc.php b/server/plugins-available/xmpp_plugin.inc.php index b4407a5a254f966802242a6dfa19174ceb81bb31..7803e632366088ff997df52038db62b88ee7c72d 100644 --- a/server/plugins-available/xmpp_plugin.inc.php +++ b/server/plugins-available/xmpp_plugin.inc.php @@ -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']);