Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
inject-tunnel-ssh
Advanced tools
Integrate tunnel-ssh without wrapping your existing codebase
$ npm install --save inject-tunnel-ssh
The injector was build to support almost zero changes to your existing codebase.
In the following example explains the integration (well injection) based on a little mongojs app..
var db = require('mongojs')('tunneltest1.com/test');
db.test.findOne(console.log);
For some we now need a tunnel to connect to the server..
// ---- START INTEGRATION CODE -----
require('inject-tunnel-ssh')([{
dstPort: 27017,
host: 'tunneltest1.com',
username: 'root'
}]).on('error',console.log);
// ---- END INTEGRATION CODE -----
var db = require('mongojs')('tunneltest1.com/test');
db.test.findOne(console.log);
The injector is a module wrapping the native node "net.connection" function to inject the tunnel configuration.
You can use the same properties as you would use in tunnel-ssh but in form of an array, since you can setup as many host / port combinations as you want. If no localPort is provided, the injector will search for a free one. For more information about the configuration please refer to the tunnel-ssh package.
If you get stuck using the lib please raise an issue or wait until we write a better readme.. ;)
MIT © Christoph Hagenbrock
FAQs
Integrate tunnel-ssh without wrapping your existing codebase
We found that inject-tunnel-ssh 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.