Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
aedes-protocol-decoder
Advanced tools
Protocol decoder for Aedes MQTT Broker
The purpose of this module is to be used inside aedes-server-factory bindConnection
function, which is called when the server receives a connection from client (before CONNECT packet). The client object state is in default and its connected state is false.
The function extract socket details and if aedes-server-factory
trustProxy
option is set to true, it will first parse http headers (x-real-ip | x-forwarded-for) and/or proxy protocol (v1 and v2), then passing the informations to aedes
that will assign them to client.connDetails
.
The function protocolDecoder
and extractSocketDetails
returns ConnectionDetails, if the object contains data
property, it will be parsed as an mqtt-packet.
npm install aedes-protocol-decoder --save
var aedes = require('aedes')
var { protocolDecoder } = require('aedes-protocol-decoder')
var { createServer } = require('aedes-server-factory')
var port = 1883
var broker = aedes({
preConnect: function (client, packet, done) {
if (client.connDetails && client.connDetails.ipAddress) {
client.ip = client.connDetails.ipAddress
}
return done(null, true)
},
})
var server = createServer(broker, { trustProxy: true, protocolDecoder })
server.listen(port, function () {
console.log('server listening on port', port)
})
MIT
FAQs
Aedes plugin to decode connection frame and validate proxies
The npm package aedes-protocol-decoder receives a total of 1,187 weekly downloads. As such, aedes-protocol-decoder popularity was classified as popular.
We found that aedes-protocol-decoder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.