mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2025-12-18 20:17:46 +00:00
set strict source (#185)
* set strict source RTPBleed * change to env var for strict source * Update srtp-transcoding.json * lint * lint * reverse the logic * and argghhh * clarification * change
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
"DTLS": "off",
|
||||
"SDES": "off",
|
||||
"ICE": "remove",
|
||||
"flags": ["media handover", "port latching"],
|
||||
"flags": ["port latching"],
|
||||
"rtcp-mux": ["demux"]
|
||||
}
|
||||
@@ -3,13 +3,13 @@
|
||||
"transport-protocol": "UDP/TLS/RTP/SAVPF",
|
||||
"ICE": "force",
|
||||
"SDES": "off",
|
||||
"flags": ["generate mid", "SDES-no", "media handover", "port latching"],
|
||||
"flags": ["generate mid", "SDES-no", "port latching"],
|
||||
"rtcp-mux": ["require"]
|
||||
},
|
||||
"teams": {
|
||||
"transport-protocol": "RTP/SAVP",
|
||||
"ICE": "force",
|
||||
"flags": ["generate mid", "media handover",
|
||||
"flags": ["generate mid",
|
||||
"SDES-no-AES_CM_128_HMAC_SHA1_32",
|
||||
"SDES-no-F8_128_HMAC_SHA1_80",
|
||||
"SDES-no-F8_128_HMAC_SHA1_32",
|
||||
|
||||
@@ -28,6 +28,12 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams
|
||||
srcOpts.flags.push('inject DTMF');
|
||||
}
|
||||
}
|
||||
/** By default use strict source to secure aganst RTPInject vuln,
|
||||
* set env var to true to disable it and use media handover instead */
|
||||
const disableStrictSource = !!process.env.RTPENGINE_DISABLE_STRICT_SOURCE;
|
||||
dstOpts.flags.push(disableStrictSource ? 'media handover' : 'strict source');
|
||||
srcOpts.flags.push(disableStrictSource ? 'media handover' : 'strict source');
|
||||
|
||||
const common = {
|
||||
'call-id': req.get('Call-ID'),
|
||||
'replace': ['origin', 'session-connection'],
|
||||
|
||||
Reference in New Issue
Block a user