Merge pull request #276 from maraoz/add/stun-turn-config
STUN/TURN in default config
This commit is contained in:
commit
441cf3be75
2 changed files with 69 additions and 14 deletions
|
|
@ -9,18 +9,77 @@ var config = {
|
||||||
//host: 'localhost',
|
//host: 'localhost',
|
||||||
//port: 10009,
|
//port: 10009,
|
||||||
//path: '/',
|
//path: '/',
|
||||||
//
|
//
|
||||||
key: 'g23ihfh82h35rf', // api key for the peerjs server
|
key: 'g23ihfh82h35rf', // api key for the peerjs server
|
||||||
host:'162.242.219.26', // peerjs server
|
host: '162.242.219.26', // peerjs server
|
||||||
port:10009,
|
port: 10009,
|
||||||
path: '/',
|
path: '/',
|
||||||
maxPeers: 15,
|
maxPeers: 15,
|
||||||
// debug: 3,
|
debug: 3,
|
||||||
sjclParams: {
|
sjclParams: {
|
||||||
salt: 'mjuBtGybi/4=', // choose your own salt (base64)
|
salt: 'mjuBtGybi/4=', // choose your own salt (base64)
|
||||||
iter:1000,
|
iter: 1000,
|
||||||
mode:'ccm',
|
mode: 'ccm',
|
||||||
ts:parseInt(64),
|
ts: parseInt(64),
|
||||||
|
},
|
||||||
|
config: {
|
||||||
|
'iceServers': [
|
||||||
|
// Pass in STUN and TURN servers for maximum network compatibility
|
||||||
|
{
|
||||||
|
url: 'stun:stun01.sipphone.com'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.ekiga.net'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.fwdnet.net'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.ideasip.com'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.iptel.org'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.rixtelecom.se'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.schlund.de'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.l.google.com:19302'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun1.l.google.com:19302'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun2.l.google.com:19302'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun3.l.google.com:19302'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun4.l.google.com:19302'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stunserver.org'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.softjoys.com'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.voiparound.com'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.voipbuster.com'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.voipstunt.com'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.voxgratia.org'
|
||||||
|
}, {
|
||||||
|
url: 'stun:stun.xten.com'
|
||||||
|
}, {
|
||||||
|
url: 'turn:numb.viagenie.ca',
|
||||||
|
credential: 'muazkh',
|
||||||
|
username: 'webrtc@live.com'
|
||||||
|
}, {
|
||||||
|
url: 'turn:192.158.29.39:3478?transport=udp',
|
||||||
|
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
|
||||||
|
username: '28224511:1379330808'
|
||||||
|
}, {
|
||||||
|
url: 'turn:192.158.29.39:3478?transport=tcp',
|
||||||
|
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
|
||||||
|
username: '28224511:1379330808'
|
||||||
|
}, {
|
||||||
|
url: 'turn:homeo@turn.bistri.com:80',
|
||||||
|
credential: 'homeo'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
limits: {
|
limits: {
|
||||||
|
|
@ -47,7 +106,6 @@ var config = {
|
||||||
storageSalt: 'mjuBtGybi/4=', // choose your own salt (base64)
|
storageSalt: 'mjuBtGybi/4=', // choose your own salt (base64)
|
||||||
};
|
};
|
||||||
|
|
||||||
var log = function () {
|
var log = function() {
|
||||||
if (config.verbose) console.log(arguments);
|
if (config.verbose) console.log(arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,8 @@ function Network(opts) {
|
||||||
mode:'ccm',
|
mode:'ccm',
|
||||||
ts:parseInt(64),
|
ts:parseInt(64),
|
||||||
};
|
};
|
||||||
|
this.opts = {};
|
||||||
|
['config', 'port', 'host', 'path', 'debug', 'key'].forEach(function(k) {
|
||||||
// For using your own peerJs server
|
|
||||||
self.opts = {};
|
|
||||||
['port', 'host', 'path', 'debug', 'key'].forEach(function(k) {
|
|
||||||
if (opts[k]) self.opts[k] = opts[k];
|
if (opts[k]) self.opts[k] = opts[k];
|
||||||
});
|
});
|
||||||
this.cleanUp();
|
this.cleanUp();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue