Skip to content

Instantly share code, notes, and snippets.

@maps90
Created April 6, 2020 04:41
Show Gist options
  • Save maps90/e06043734cda7bb67392ce2599ae25d4 to your computer and use it in GitHub Desktop.
Save maps90/e06043734cda7bb67392ce2599ae25d4 to your computer and use it in GitHub Desktop.
config in jitsi
var 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',
clientNode: 'http://example.loc/jitsimeet',
useStunTurn: true,
openBridgeChannel: 'websocket',
useNicks: false,
testing: {
enableFirefoxSimulcast: false,
p2pTestMode: false
},
enableNoAudioDetection: true,
enableNoisyMicDetection: true,
resolution: 720,
constraints: {
video: {
aspectRatio: 16 / 9,
height: {
ideal: 720,
max: 720,
min: 180
},
width: {
ideal: 1280,
max: 1280,
min: 320
}
}
},
desktopSharingChromeExtId: null,
desktopSharingChromeSources: [ 'screen', 'window', 'tab' ],
desktopSharingChromeMinExtVersion: '0.1',
channelLastN: -1,
enableWelcomePage: true,
enableUserRolesBasedOnToken: false,
p2p: {
enabled: true,
useStunTurn: true,
stunServers: [
{ urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' }
],
preferH264: true
},
deploymentInfo: {
// shard: "shard1",
// region: "europe",
// userRegion: "asia"
},
};
org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true
#org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
#org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost
org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.meet.example.loc
org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=XXXXXXXXXXXXXX
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.meet.example.loc
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=XXXXXXXXXXXXXXXXXXX
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=10.10.10.5
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=XXXXXXXXXX
videobridge.websockets.domain=meet.example.loc
videobridge.websockets.enabled=true
server_names_hash_bucket_size 64;
server {
listen 80;
listen [::]:80;
server_name meet.example.loc;
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /usr/share/jitsi-meet;
}
location = /.well-known/acme-challenge/ {
return 404;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name meet.example.loc;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED";
add_header Strict-Transport-Security "max-age=31536000";
ssl_certificate /etc/letsencrypt/live/meet.example.loc/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/meet.example.loc/privkey.pem;
root /usr/share/jitsi-meet;
# ssi on with javascript for multidomain variables in config.js
ssi on;
ssi_types application/x-javascript application/javascript;
index index.html index.htm;
error_page 404 /static/404.html;
location = /config.js {
alias /etc/jitsi/meet/config.js;
}
location = /external_api.js {
alias /usr/share/jitsi-meet/libs/external_api.min.js;
}
#ensure all static content can always be found first
location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
{
add_header 'Access-Control-Allow-Origin' '*';
alias /usr/share/jitsi-meet/$1/$2;
}
# BOSH
location = /http-bind {
proxy_pass http://localhost:5280/http-bind;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
}
# xmpp websockets
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;
}
location ~ ^/([^/?&:'"]+)$ {
try_files $uri @root_path;
}
location @root_path {
rewrite ^/(.*)$ / break;
}
location ~ ^/([^/?&:'"]+)/config.js$
{
set $subdomain "$1.";
set $subdir "$1/";
alias /etc/jitsi/meet/config.js;
}
#Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
location ~ ^/([^/?&:'"]+)/(.*)$ {
set $subdomain "$1.";
set $subdir "$1/";
rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
}
# BOSH for subdomains
location ~ ^/([^/?&:'"]+)/http-bind {
set $subdomain "$1.";
set $subdir "$1/";
set $prefix "$1";
rewrite ^/(.*)$ /http-bind;
}
# websockets for subdomains
location ~ ^/([^/?&:'"]+)/xmpp-websocket {
set $subdomain "$1.";
set $subdir "$1/";
set $prefix "$1";
rewrite ^/(.*)$ /xmpp-websocket;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment