
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
medooze-media-server-client
Advanced tools
This client libray alllows to easily connect to the Medooze Media Server with a simple API.
You can find a demo in the demo
directory. To run it just do:
npm i
npm run-script dist
cd demo
npm i
node index.js <your ip address>
In order to connect with the server you will need to connect via websocket and open a new transaction manager:
//Connect with websocket
const ws = new WebSocket(url);
//Create transaction manager
const tm = new TransactionManager(ws);
//Create managed peer connection
const client = new MediaServerClient(tm);
//Start on open
ws.onopen = async ()=>{
//Create new managed pc
pc = await client.createManagedPeerConnection();
};
Server side you will have to be listening for new clients by using the PeerConnectionserver:
const connection = request.accept(protocol);
//Create new transaction manager
const tm = new TransactionManager(connection);
//Create new managed peerconnection server for this
const mngr = endpoint.createPeerConnectionServer(tm,Capabilities);
//LIsten for remotelly created peer connections
mngr.on("transport",(transport)=>{
//Here you will get the transport associated to the PeerConnection created in client.createManagedPeerConnection()
});
Once you have both the managed peerconnection client and the server transport created you can add tracks in either side, for example if you do it in the browser:
//Browser
const sender = await pc.addTrack(track,stream);
Will trigger the incomingtrack
event on the server transport.
//Server
transport.on("incomingtrack",(track,stream)=>{});
And vice versa, a track added in the transport
//Crete empty stream
transport.createOutgoingStream(outgoingStreamId);
//Create ougoing track
const outgoing = outgoingStream.createTrack("video");
Will trigger the ontrack
event on the managed peer connection on the browser:
//Event handler
pc.ontrack = (event) => console.log(event);
Similarily, removing the tracks on browser or stopping the tracks on the server, will trigger the appropiate event on the other side.
Factory object used to synchronze with the server.
Creates a new client object.
transactionManager
A transaction manager connected with the server (see TransactionManager for more info).Creates a new managed peer connection client object.
options
Same options allowed on the PeerConnection configuration dictionary.Addintionaly the following options can be used:
options.forceSDPMunging
Do always SDP munging for setting up simulcast on Chromeoptions.strictW3C
Force strict W3C api compatibility (disables hacks)This will create a new Transport object on the server.
Adds a new track to the client and creates a new IncomingStreamTrack (and IncomingStream if needed) server side.
track
The track to sendstream
The stream to sendparams
Send params (Optional)
codecs
An array of desired codecs (eg. ["h264]), this will remove the non present codecs from the local sdp offer (Optional)encodings
An array of RTCRtpEncodingParameters which can be used for enabling simulcast. If the encodings array is provided it will be set accordingly on the transcevier (on the sender.setParameters if on Firefox) and if it is not supported, it will mangle the SDP for chrome adding the required ssrcs to enable simulcast (Optional)Stops sending the track, will stop the IncomingStreamTrack server side also.
sender
The RTCSender returned on the addTrackProxy for TCPeerConnection getStats.
selector
See RTCPeerConnection getStatsCloses local peerconnection and remote transport
Proxy for the RTCPeerConnection ontrack event handler. As local ids will not match the remote ids anymore in WebRTC, we have extended the event to make them available:
remoteStreamId
The stream id of the OutgoingStream on the serverremoteTrackId
The track id of the OutgoingStreamTrack on the serverEvent handler for the new ontrackended event. The event fired will be an RTCTrackEvent with event name trackended
.
Proxy for the RTCPeerConnection onstatsended event handler.
Just create a js bundle and link it in your web app.
npm i
npm run-script dist
You will need browserify
to be installed globally, you can do it by:
npm i -g browserify
The js file will be located on the dist
directory. Note that you will also need to use the Transaction Manager library.
Sergio Garcia Murillo
MIT
FAQs
Medooze Media Server Client
The npm package medooze-media-server-client receives a total of 7 weekly downloads. As such, medooze-media-server-client popularity was classified as not popular.
We found that medooze-media-server-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.