Merge pull request #133141 from helsinki-systems/feat/jitsi-meet-websocket
nixos/jitsi-meet: add support for xmpp-websocket
This commit is contained in:
@@ -37,6 +37,7 @@ let
|
|||||||
focus = "focus.${cfg.hostName}";
|
focus = "focus.${cfg.hostName}";
|
||||||
};
|
};
|
||||||
bosh = "//${cfg.hostName}/http-bind";
|
bosh = "//${cfg.hostName}/http-bind";
|
||||||
|
websocket = "wss://${cfg.hostName}/xmpp-websocket";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -163,7 +164,9 @@ in
|
|||||||
ping = mkDefault true;
|
ping = mkDefault true;
|
||||||
roster = mkDefault true;
|
roster = mkDefault true;
|
||||||
saslauth = mkDefault true;
|
saslauth = mkDefault true;
|
||||||
|
smacks = mkDefault true;
|
||||||
tls = mkDefault true;
|
tls = mkDefault true;
|
||||||
|
websocket = mkDefault true;
|
||||||
};
|
};
|
||||||
muc = [
|
muc = [
|
||||||
{
|
{
|
||||||
@@ -185,12 +188,17 @@ in
|
|||||||
#-- muc_room_cache_size = 1000
|
#-- muc_room_cache_size = 1000
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extraModules = [ "pubsub" ];
|
extraModules = [ "pubsub" "smacks" ];
|
||||||
extraPluginPaths = [ "${pkgs.jitsi-meet-prosody}/share/prosody-plugins" ];
|
extraPluginPaths = [ "${pkgs.jitsi-meet-prosody}/share/prosody-plugins" ];
|
||||||
extraConfig = mkAfter ''
|
extraConfig = lib.mkMerge [ (mkAfter ''
|
||||||
Component "focus.${cfg.hostName}" "client_proxy"
|
Component "focus.${cfg.hostName}" "client_proxy"
|
||||||
target_address = "focus@auth.${cfg.hostName}"
|
target_address = "focus@auth.${cfg.hostName}"
|
||||||
'';
|
'')
|
||||||
|
(mkBefore ''
|
||||||
|
cross_domain_websocket = true;
|
||||||
|
consider_websocket_secure = true;
|
||||||
|
'')
|
||||||
|
];
|
||||||
virtualHosts.${cfg.hostName} = {
|
virtualHosts.${cfg.hostName} = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
domain = cfg.hostName;
|
domain = cfg.hostName;
|
||||||
@@ -198,6 +206,10 @@ in
|
|||||||
authentication = "anonymous"
|
authentication = "anonymous"
|
||||||
c2s_require_encryption = false
|
c2s_require_encryption = false
|
||||||
admins = { "focus@auth.${cfg.hostName}" }
|
admins = { "focus@auth.${cfg.hostName}" }
|
||||||
|
smacks_max_unacked_stanzas = 5
|
||||||
|
smacks_hibernation_time = 60
|
||||||
|
smacks_max_hibernated_sessions = 1
|
||||||
|
smacks_max_old_sessions = 1
|
||||||
'';
|
'';
|
||||||
ssl = {
|
ssl = {
|
||||||
cert = "/var/lib/jitsi-meet/jitsi-meet.crt";
|
cert = "/var/lib/jitsi-meet/jitsi-meet.crt";
|
||||||
@@ -286,6 +298,11 @@ in
|
|||||||
rewrite ^/(.*)$ / break;
|
rewrite ^/(.*)$ / break;
|
||||||
'';
|
'';
|
||||||
locations."~ ^/([^/\\?&:'\"]+)$".tryFiles = "$uri @root_path";
|
locations."~ ^/([^/\\?&:'\"]+)$".tryFiles = "$uri @root_path";
|
||||||
|
locations."^~ /xmpp-websocket" = {
|
||||||
|
priority = 100;
|
||||||
|
proxyPass = "http://localhost:5280/xmpp-websocket";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
locations."=/http-bind" = {
|
locations."=/http-bind" = {
|
||||||
proxyPass = "http://localhost:5280/http-bind";
|
proxyPass = "http://localhost:5280/http-bind";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user