[jitsi-dev] configure xmmp framework to support both websocket and BOSH


#1

Hi Jitsi developers.

Can you help me with configure XMPP Framework to support both websocket and BOSH?
I've added websocket in modules_enabled and it doesn't work.

Thanks.

--�
� ���������,
���� ��������
+375 (29) 9350117
admin@medicine-prof.com


#2

Hello,

There are two pieces needed to enable websockets in prosody.

The first is a plugin to prosody to support websockets. The second is an nginx configuration to pass websocket connections through at a particular URL (/xmpp-websocket)

The plugin for mod_websocket comes from the git repo here: https://github.com/andyet/otalk-server.git

It can be installed by copying mod_websocket from otalk-server/ to /usr/lib/prosody/modules/

Then in the prosody configuration, modules_enabled should include “websocket”:

modules_enabled = {
      "websocket”;
};

We also include the following two configuration parameters as part of the global prosody configuration:

cross_domain_websocket = true;
consider_websocket_secure = true;

The nginx configuration should exist in whichever virtual host is being used to forward the /http-bind URL to prosody.

This configuration adds a new URL /xmpp-websocket which can be connected to in order to perform websocket-based XMPP operations.

You will need to replace XMPP_HOSTNAME with the virtual host name

   # xmpp websockets
   location /xmpp-websocket {
       proxy_pass http://localhost:5280/xmpp-websocket;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       proxy_set_header Host XMPP_HOSTNAME;
       tcp_nodelay on;
   }

The final note is: websockets rely on long-lived HTTP connections, so if there are any HTTP proxies between nginx and the client application (haproxy or the liked), ensure that the tunnel timeouts are set fairly high (1 hour or more).

···

On Jan 22, 2016, at 04:54, Юрий Лапытько <admin@medicine-prof.com> wrote:

Hi Jitsi developers.

Can you help me with configure XMPP Framework to support both websocket and BOSH?
I've added websocket in modules_enabled and it doesn't work.

Thanks.

--
С уважением,
Юрий Лапытько
+375 (29) 9350117
admin@medicine-prof.com

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

hi.

  1. clone this link https://github.com/andyet/otalk-server it says: This package is obsolete. prosody-trunk has all the required functionality these days.

  2. add websocket here:
    /etc/prosody/conf.d/usa.cloudinterpreter.com.cfg.lua

now it has

    modules_enabled = {

        "bosh";

        "pubsub";

        "ping"; -- Enable mod_ping

        "websocket";

    }

cross_domain_websocket = true;

consider_websocket_secure = true;

  1. added websockets config here: /etc/nginx/sites-enabled/usa.cloudinterpreter.com.conf

now it has:

xmpp websockets

location /xmpp-websocket {

   proxy_pass http://localhost:5280/xmpp-websocket;

   proxy_http_version 1.1;

   proxy_set_header Upgrade $http_upgrade;

   proxy_set_header Connection "upgrade";

   proxy_set_header Host usa.cloudinterpreter.com;

   tcp_nodelay on;

}

  1. restart prosody and nginx

  2. open the link https://usa.cloudinterpreter.com/xmpp-websocket and see this: 404 not found Whatever you were looking for is not here. It’s behind you.

what am I doing wrong?

···

22.01.2016, 20:07, “Aaron van Meerten” avanmeerten@atlassian.com:

Hello,

There are two pieces needed to enable websockets in prosody.

The first is a plugin to prosody to support websockets. The second is an nginx configuration to pass websocket connections through at a particular URL (/xmpp-websocket)

The plugin for mod_websocket comes from the git repo here: https://github.com/andyet/otalk-server.git

It can be installed by copying mod_websocket from otalk-server/ to /usr/lib/prosody/modules/

Then in the prosody configuration, modules_enabled should include “websocket”:

modules_enabled = {

"websocket”;

};

We also include the following two configuration parameters as part of the global prosody configuration:

cross_domain_websocket = true;
consider_websocket_secure = true;

The nginx configuration should exist in whichever virtual host is being used to forward the /http-bind URL to prosody.

This configuration adds a new URL /xmpp-websocket which can be connected to in order to perform websocket-based XMPP operations.

You will need to replace XMPP_HOSTNAME with the virtual host name

xmpp websockets

location /xmpp-websocket {
proxy_pass http://localhost:5280/xmpp-websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_set_header Host XMPP_HOSTNAME;
tcp_nodelay on;
}

The final note is: websockets rely on long-lived HTTP connections, so if there are any HTTP proxies between nginx and the client application (haproxy or the liked), ensure that the tunnel timeouts are set fairly high (1 hour or more).

On Jan 22, 2016, at 04:54, Юрий Лапытько admin@medicine-prof.com wrote:

Hi Jitsi developers.

Can you help me with configure XMPP Framework to support both websocket and BOSH?
I’ve added websocket in modules_enabled and it doesn’t work.

Thanks.


С уважением,
Юрий Лапытько
+375 (29) 9350117
admin@medicine-prof.com


dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

,


dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

С уважением,

Юрий Лапытько

+375 (29) 9350117

admin@medicine-prof.com