Gathering detailed insights and metrics for aedes-protocol-decoder
Gathering detailed insights and metrics for aedes-protocol-decoder
Gathering detailed insights and metrics for aedes-protocol-decoder
Gathering detailed insights and metrics for aedes-protocol-decoder
npm install aedes-protocol-decoder
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
3 Stars
20 Commits
3 Forks
8 Watching
2 Branches
3 Contributors
Updated on 20 Sept 2023
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
22.8%
528
Compared to previous day
Last week
11.2%
2,657
Compared to previous week
Last month
-13.4%
11,069
Compared to previous month
Last year
9.6%
83,029
Compared to previous year
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
.
Additionally, if the current socket is a TLS socket, the module will extract the authorization status and the full certificate chain.
The function protocolDecoder
and extractSocketDetails
returns ConnectionDetails, if the object contains data
property, it will be parsed as an mqtt-packet.
1npm install aedes-protocol-decoder --save
1var aedes = require('aedes') 2var { protocolDecoder } = require('aedes-protocol-decoder') 3var { createServer } = require('aedes-server-factory') 4var port = 1883 5 6var broker = aedes({ 7 preConnect: function (client, packet, done) { 8 if (client.connDetails && client.connDetails.ipAddress) { 9 client.ip = client.connDetails.ipAddress 10 } 11 return done(null, true) 12 }, 13}) 14 15var server = createServer(broker, { trustProxy: true, protocolDecoder }) 16server.listen(port, function () { 17 console.log('server listening on port', port) 18})
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 7/13 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More