Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Sync your request to the same node with frodo.
Frodo.io uses etcd and hashring to provide you with a server by some key.
Simple use case: clustered database that accessed by a clustered layer that wraps it. The changes on an entity should go through the same server to prevent inconsistency.
Simple test app that register servers and then uses them to get id would be:
var Frodo = require('frodoio');
var frodo = new Frodo({ context: 'appname', etcdServers: [ { host: '127.0.0.1', port: 4001 } ]});
Q.all(frodo.addServer('dataacess1:3030'),
frodo.addServer('dataacess2:3030'),
frodo.addServer('dataacess3:3030')).then(function () {
frodo.serverById(function (server) {
request.put('http://' + server + '/entity');
});
});
But this application does not make any sense, because you probably want to addServer from the server and run serverById from the client. Server:
var Frodo = require('frodoio');
var frodo = new Frodo({ context: 'appname', etcdServers: [ { host: '127.0.0.1', port: 4001 } ]});
// http://stackoverflow.com/questions/3653065/get-local-ip-address-in-node-js
var ip = _.chain(require('os').networkInterfaces()).flatten().filter(function(val){ return (val.family == 'IPv4' && val.internal == false) }).pluck('address').first().value();
var me = ip + ':3030';
function start(done) {
frodo.addServer(me).then(done);
}
function stop(done) {
frodo.removeServer(me).then(function () {
frodo.close().then(done);
});
}
Client:
var Frodo = require('frodoio');
var frodo = new Frodo({ context: 'appname', etcdServers: [ { host: '127.0.0.1', port: 4001 } ]});
frodo.serverById(function (server) {
request.put('http://' + server + '/entity');
});
Any comments/suggestions/pull requests would be appreciated!
Apache
FAQs
Node.js library for distributing requests in a ring of servers
The npm package frodoio receives a total of 2 weekly downloads. As such, frodoio popularity was classified as not popular.
We found that frodoio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.