mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2025-12-19 04:27:45 +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",
|
"DTLS": "off",
|
||||||
"SDES": "off",
|
"SDES": "off",
|
||||||
"ICE": "remove",
|
"ICE": "remove",
|
||||||
"flags": ["media handover", "port latching"],
|
"flags": ["port latching"],
|
||||||
"rtcp-mux": ["demux"]
|
"rtcp-mux": ["demux"]
|
||||||
}
|
}
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
"transport-protocol": "UDP/TLS/RTP/SAVPF",
|
"transport-protocol": "UDP/TLS/RTP/SAVPF",
|
||||||
"ICE": "force",
|
"ICE": "force",
|
||||||
"SDES": "off",
|
"SDES": "off",
|
||||||
"flags": ["generate mid", "SDES-no", "media handover", "port latching"],
|
"flags": ["generate mid", "SDES-no", "port latching"],
|
||||||
"rtcp-mux": ["require"]
|
"rtcp-mux": ["require"]
|
||||||
},
|
},
|
||||||
"teams": {
|
"teams": {
|
||||||
"transport-protocol": "RTP/SAVP",
|
"transport-protocol": "RTP/SAVP",
|
||||||
"ICE": "force",
|
"ICE": "force",
|
||||||
"flags": ["generate mid", "media handover",
|
"flags": ["generate mid",
|
||||||
"SDES-no-AES_CM_128_HMAC_SHA1_32",
|
"SDES-no-AES_CM_128_HMAC_SHA1_32",
|
||||||
"SDES-no-F8_128_HMAC_SHA1_80",
|
"SDES-no-F8_128_HMAC_SHA1_80",
|
||||||
"SDES-no-F8_128_HMAC_SHA1_32",
|
"SDES-no-F8_128_HMAC_SHA1_32",
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams
|
|||||||
srcOpts.flags.push('inject DTMF');
|
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 = {
|
const common = {
|
||||||
'call-id': req.get('Call-ID'),
|
'call-id': req.get('Call-ID'),
|
||||||
'replace': ['origin', 'session-connection'],
|
'replace': ['origin', 'session-connection'],
|
||||||
|
|||||||
Reference in New Issue
Block a user