mirror of
https://github.com/YunoHost-Apps/jitsi_ynh.git
synced 2024-09-03 19:35:57 +02:00
Missing mod_http_altconnect
This commit is contained in:
parent
b0bad7bc12
commit
7b652984f6
8 changed files with 82 additions and 57 deletions
|
@ -46,7 +46,7 @@ var config = {
|
||||||
testing: {
|
testing: {
|
||||||
// P2P test mode disables automatic switching to P2P when there are 2
|
// P2P test mode disables automatic switching to P2P when there are 2
|
||||||
// participants in the conference.
|
// participants in the conference.
|
||||||
p2pTestMode: false
|
// p2pTestMode: false
|
||||||
|
|
||||||
// Enables the test specific features consumed by jitsi-meet-torture
|
// Enables the test specific features consumed by jitsi-meet-torture
|
||||||
// testMode: false
|
// testMode: false
|
||||||
|
@ -379,7 +379,7 @@ var config = {
|
||||||
|
|
||||||
// { urls: 'stun:__DOMAIN__:4446' },
|
// { urls: 'stun:__DOMAIN__:4446' },
|
||||||
{ urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' }
|
{ urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' }
|
||||||
]
|
],
|
||||||
|
|
||||||
// Sets the ICE transport policy for the p2p connection. At the time
|
// Sets the ICE transport policy for the p2p connection. At the time
|
||||||
// of this writing the list of possible values are 'all' and 'relay',
|
// of this writing the list of possible values are 'all' and 'relay',
|
||||||
|
|
|
@ -1,55 +1,10 @@
|
||||||
component_ports = { __PORT_COMPONENT__ }
|
component_ports = { __PORT_COMPONENT__ }
|
||||||
--c2s_require_encryption = false --Why would it be needed?
|
-- c2s_require_encryption = false --Why would it be needed?
|
||||||
|
-- s2s_secure_auth = false
|
||||||
|
|
||||||
plugin_paths = { "__FINAL_PATH__/jitsi-meet-prosody/" }
|
plugin_paths = { "__FINAL_PATH__/jitsi-meet-prosody/" }
|
||||||
|
|
||||||
modules_enabled = {
|
modules_enabled = {
|
||||||
|
|
||||||
-- Generally required
|
|
||||||
"roster"; -- Allow users to have a roster. Recommended.
|
|
||||||
"saslauth"; -- Authentication for clients. Recommended if you want to log in.
|
|
||||||
"tls"; -- Add support for secure TLS on c2s/s2s connections
|
|
||||||
"disco"; -- Service discovery
|
|
||||||
|
|
||||||
-- Not essential, but recommended
|
|
||||||
"private"; -- Private XML storage (for room bookmarks, etc.)
|
|
||||||
"vcard"; -- Allow users to set vCards
|
|
||||||
"pep"; -- Allows setting of mood, tune, etc.
|
|
||||||
"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
|
|
||||||
"bidi"; -- Enables Bidirectional Server-to-Server Streams.
|
|
||||||
|
|
||||||
-- Nice to have
|
|
||||||
"version"; -- Replies to server version requests
|
|
||||||
"uptime"; -- Report how long server has been running
|
|
||||||
"time"; -- Let others know the time here on this server
|
|
||||||
"ping"; -- Replies to XMPP pings with pongs
|
|
||||||
"register"; -- Allow users to register on this server using a client and change passwords
|
|
||||||
"stream_management"; -- Allows clients and servers to use Stream Management
|
|
||||||
"stanza_optimizations"; -- Allows clients to use Client State Indication and SIFT
|
|
||||||
"message_carbons"; -- Allows clients to enable carbon copies of messages
|
|
||||||
"mam"; -- Enable server-side message archives using Message Archive Management
|
|
||||||
"push"; -- Enable Push Notifications via PubSub using XEP-0357
|
|
||||||
"lastactivity"; -- Enables clients to know the last presence status of an user
|
|
||||||
"adhoc_cm"; -- Allow to set client certificates to login through SASL External via adhoc
|
|
||||||
"admin_adhoc"; -- administration adhoc commands
|
|
||||||
"bookmarks"; -- XEP-0048 Bookmarks synchronization between PEP and Private Storage
|
|
||||||
"sec_labels"; -- Allows to use a simplified version XEP-0258 Security Labels and related ACDFs.
|
|
||||||
"privacy"; -- Add privacy lists and simple blocking command support
|
|
||||||
|
|
||||||
-- Other specific functionality
|
|
||||||
--"admin_telnet"; -- administration console, telnet to port 5582
|
|
||||||
--"admin_web"; -- administration web interface
|
|
||||||
"bosh"; -- Enable support for BOSH clients, aka "XMPP over Bidirectional Streams over Synchronous HTTP"
|
|
||||||
--"compression"; -- Allow clients to enable Stream Compression
|
|
||||||
--"spim_block"; -- Require authorization via OOB form for messages from non-contacts and block unsollicited messages
|
|
||||||
--"gate_guard"; -- Enable config-based blacklisting and hit-based auto-banning features
|
|
||||||
--"incidents_handling"; -- Enable Incidents Handling support (can be administered via adhoc commands)
|
|
||||||
--"server_presence"; -- Enables Server Buddies extension support
|
|
||||||
--"service_directory"; -- Enables Service Directories extension support
|
|
||||||
--"public_service"; -- Enables Server vCard support for public services in directories and advertises in features
|
|
||||||
--"register_api"; -- Provides secure API for both Out-Of-Band and In-Band registration for E-Mail verification
|
|
||||||
"websocket"; -- Enable support for WebSocket clients, aka "XMPP over WebSockets"
|
|
||||||
|
|
||||||
-- For Jitsi Meet
|
-- For Jitsi Meet
|
||||||
"http_altconnect";
|
"http_altconnect";
|
||||||
}
|
}
|
||||||
|
@ -85,7 +40,7 @@ VirtualHost "__DOMAIN__"
|
||||||
"ping"; -- Enable mod_ping
|
"ping"; -- Enable mod_ping
|
||||||
"speakerstats";
|
"speakerstats";
|
||||||
"conference_duration";
|
"conference_duration";
|
||||||
"extdisco";
|
"extdisco";
|
||||||
}
|
}
|
||||||
c2s_require_encryption = false
|
c2s_require_encryption = false
|
||||||
external_services = {
|
external_services = {
|
||||||
|
|
59
conf/mod_http_altconnect.lua
Normal file
59
conf/mod_http_altconnect.lua
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
-- mod_http_altconnect
|
||||||
|
-- XEP-0156: Discovering Alternative XMPP Connection Methods
|
||||||
|
|
||||||
|
module:depends"http";
|
||||||
|
|
||||||
|
local mm = require "core.modulemanager";
|
||||||
|
local json = require"util.json";
|
||||||
|
local st = require"util.stanza";
|
||||||
|
local array = require"util.array";
|
||||||
|
|
||||||
|
local function get_supported()
|
||||||
|
local uris = array();
|
||||||
|
if mm.is_loaded(module.host, "bosh") or mm.is_loaded("*", "bosh") then
|
||||||
|
uris:push({ rel = "urn:xmpp:alt-connections:xbosh", href = module:http_url("bosh", "/http-bind") });
|
||||||
|
end
|
||||||
|
if mm.is_loaded(module.host, "websocket") or mm.is_loaded("*", "websocket") then
|
||||||
|
uris:push({ rel = "urn:xmpp:alt-connections:websocket", href = module:http_url("websocket", "xmpp-websocket"):gsub("^http", "ws") });
|
||||||
|
end
|
||||||
|
return uris;
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function GET_xml(event)
|
||||||
|
local request, response = event.request, event.response;
|
||||||
|
local xrd = st.stanza("XRD", { xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' });
|
||||||
|
local uris = get_supported();
|
||||||
|
for i, method in ipairs(uris) do
|
||||||
|
xrd:tag("Link", method):up();
|
||||||
|
end
|
||||||
|
response.headers.content_type = "application/xrd+xml"
|
||||||
|
response.headers.access_control_allow_origin = "*";
|
||||||
|
return '<?xml version="1.0" encoding="UTF-8"?>' .. tostring(xrd);
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GET_json(event)
|
||||||
|
local request, response = event.request, event.response;
|
||||||
|
local jrd = { links = get_supported() };
|
||||||
|
response.headers.content_type = "application/json"
|
||||||
|
response.headers.access_control_allow_origin = "*";
|
||||||
|
return json.encode(jrd);
|
||||||
|
end;
|
||||||
|
|
||||||
|
local function GET_either(event)
|
||||||
|
local accept_type = event.request.headers.accept or "";
|
||||||
|
if ( accept_type:find("xml") or #accept_type ) < ( accept_type:find("json") or #accept_type+1 ) then
|
||||||
|
return GET_xml(event);
|
||||||
|
else
|
||||||
|
return GET_json(event);
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
|
module:provides("http", {
|
||||||
|
default_path = "/.well-known";
|
||||||
|
route = {
|
||||||
|
["GET /host-meta"] = GET_either;
|
||||||
|
-- ["GET /host-meta.xml"] = GET_xml; -- Hmmm
|
||||||
|
["GET /host-meta.json"] = GET_json;
|
||||||
|
};
|
||||||
|
});
|
|
@ -60,6 +60,9 @@ ynh_backup --src_path="/usr/share/yunohost/templates/jitsi/auth.$domain.cfg.lua"
|
||||||
# Backup Metronome Hook
|
# Backup Metronome Hook
|
||||||
ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
|
ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
|
||||||
|
|
||||||
|
# Backup Metronome Module
|
||||||
|
ynh_backup --src_path="/usr/lib/metronome/modules/mod_http_altconnect.lua"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE APP CONFIG
|
# BACKUP THE APP CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -181,9 +181,11 @@ touch "/usr/share/yunohost/templates/jitsi/auth.$domain.cfg.lua"
|
||||||
|
|
||||||
# Add Metronome hook
|
# Add Metronome hook
|
||||||
cp -R ../conf/metronome_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/50-metronome_$app
|
cp -R ../conf/metronome_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/50-metronome_$app
|
||||||
yunohost tools regen-conf metronome --force
|
|
||||||
|
|
||||||
ynh_systemd_action --service_name=metronome --action=restart
|
# Add Metronome modules
|
||||||
|
cp ../conf/mod_http_altconnect.lua /usr/lib/metronome/modules/mod_http_altconnect.lua
|
||||||
|
|
||||||
|
yunohost tools regen-conf metronome
|
||||||
|
|
||||||
metronomectl adduser $focus_user@auth.$domain $focus_password || true
|
metronomectl adduser $focus_user@auth.$domain $focus_password || true
|
||||||
metronomectl adduser $videobridge_user@auth.$domain $videobridge_secret || true
|
metronomectl adduser $videobridge_user@auth.$domain $videobridge_secret || true
|
||||||
|
|
|
@ -115,6 +115,11 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring Metronome..."
|
ynh_script_progression --message="Reconfiguring Metronome..."
|
||||||
|
|
||||||
|
# Remove Metronome modules
|
||||||
|
ynh_secure_remove --file="/usr/lib/metronome/modules/mod_http_altconnect.lua"
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=metronome --action=restart
|
||||||
|
|
||||||
metronomectl deluser $focus_user@auth.$domain || true
|
metronomectl deluser $focus_user@auth.$domain || true
|
||||||
metronomectl deluser $videobridge_user@auth.$domain || true
|
metronomectl deluser $videobridge_user@auth.$domain || true
|
||||||
|
|
||||||
|
@ -129,7 +134,7 @@ fi
|
||||||
|
|
||||||
# Remove Metronome Hook
|
# Remove Metronome Hook
|
||||||
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
|
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
|
||||||
yunohost tools regen-conf metronome --force
|
yunohost tools regen-conf metronome
|
||||||
|
|
||||||
# Delete focus user
|
# Delete focus user
|
||||||
# yunohost user delete $focus_user --purge
|
# yunohost user delete $focus_user --purge
|
||||||
|
|
|
@ -120,9 +120,11 @@ ynh_restore_file --origin_path="/usr/share/yunohost/templates/jitsi/auth.$domain
|
||||||
|
|
||||||
# Restore Metronome Hook
|
# Restore Metronome Hook
|
||||||
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
|
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/50-metronome_$app"
|
||||||
yunohost tools regen-conf metronome --force
|
|
||||||
|
|
||||||
ynh_systemd_action --service_name=metronome --action=restart
|
# Restore Metronome modules
|
||||||
|
ynh_restore_file --origin_path="/usr/lib/metronome/modules/mod_http_altconnect.lua"
|
||||||
|
|
||||||
|
yunohost tools regen-conf metronome
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP CONFIG
|
# RESTORE THE APP CONFIG
|
||||||
|
|
|
@ -64,7 +64,7 @@ if ynh_version_gt "1.0.3387~ynh2" "${current_version}" ; then
|
||||||
|
|
||||||
# Add Metronome hook
|
# Add Metronome hook
|
||||||
cp -R ../conf/metronome_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/50-metronome_$app
|
cp -R ../conf/metronome_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/50-metronome_$app
|
||||||
yunohost tools regen-conf metronome --force
|
yunohost tools regen-conf metronome
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ynh_version_gt "1.0.3969~ynh1" "${current_version}" ; then
|
if ynh_version_gt "1.0.3969~ynh1" "${current_version}" ; then
|
||||||
|
@ -75,7 +75,6 @@ if ynh_version_gt "1.0.3969~ynh1" "${current_version}" ; then
|
||||||
|
|
||||||
# Remove Previously installed Metronome modules
|
# Remove Previously installed Metronome modules
|
||||||
ynh_secure_remove --file="/usr/lib/metronome/modules/mod_carbons.lua"
|
ynh_secure_remove --file="/usr/lib/metronome/modules/mod_carbons.lua"
|
||||||
ynh_secure_remove --file="/usr/lib/metronome/modules/mod_http_altconnect.lua"
|
|
||||||
ynh_secure_remove --file="/usr/lib/metronome/modules/mod_smacks.lua"
|
ynh_secure_remove --file="/usr/lib/metronome/modules/mod_smacks.lua"
|
||||||
|
|
||||||
# Remove nodejs
|
# Remove nodejs
|
||||||
|
|
Loading…
Add table
Reference in a new issue