Jitsi设置websocket访问

Jitsi默认使用XMPP协议的BOSH和http进行绑定
也可以使用websocket进行和服务器的绑定
jitsi-meet下的config.js设置如下

ar config = {
    hosts: {
        domain: 'meet.example.loc',
        focus: 'focus.meet.example.loc',
        muc: 'conference.meet.example.loc'
    },

    // BOSH URL. FIXME: use XEP-0156 to discover it.
    bosh: '//meet.example.loc/http-bind',
    // Websocket URL
    websocket: 'wss://meet.example.loc/xmpp-websocket',

2.prosody配置文件上启用websocket

modules_ enabled = {

"websocket";

"smacks";

}

全局设置

consider_ websocket_ secure = true;

cross_ domain_ websocket = true;

think_ websocket_ secure = true;

smacks_ max_ unacked_ stanzas = 5;

smacks_ hibernation_ time = 60;

smacks_ max_ hibernated_ sessions = 1;

smacks_ max_ old_ sessions = 1;

component_ interfaces = { "0.0.0.0" };

3.nginx设置

location = /xmpp-websocket {

proxy_ pass http://127.0.0.1 :5280/xmpp-websocket?prefix=$prefix&$args;

proxy_ http_ version 1.1;

proxy_ set_ header Upgrade $http_ upgrade;

proxy_ set_ header Connection "upgrade";

proxy_ set_ header Host $http_ host;

tcp_ nodelay on;

}

你可能感兴趣的:(jitsi,prosody,WebRTC)