
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
nbd-client
Advanced tools
Linux NBD client and library for Node.js. Built to automate block storage systems.
Linux NBD client and library for Node.js. Built to automate block storage systems.
node-nbd-client can attach an NBD device in ~10ms and does all I/O in parallel. nbd-client does all I/O serially. Transmission is handled by the kernel so it performs exactly the same.nbd-client -disconnect is used. nbd-client will stop if the server crashes, even with -persist.ioctl interface by default. nbd-client defaults to the netlink interface which requires --network=host on Docker.node-nbd-client uses threads and never calls fork(), which keep sockets in the calling PID. nbd-client will fork even with -nofork (it is intended per the man page), causing a kernel deadlock if SIGKILL is sent to a container: main process waits for file descriptors to close, which cannot close because the forked process is opened, but the forked process won't quit until the Docker init process quits, which is blocked by the main process, making Docker show a zoombie process error, requiring a machine restart to unlock resources.$ npm install nbd-client --global
$ node-nbd-client --help
Usage: node-nbd-client [options] <device>
<device>Full path to the block device the client should use, example:
/dev/nbd5.
-H, --host <host>Server hostname or IP address, defaults to
localhost.
-P, --port <port>Server port, defaults to
10809, the IANA-assigned port number for the NBD protocol.
-u, --unix <path>UNIX domain socket path, overrides TCP options.
-b, --block-size <size>Block-size in bytes, defaults to
1024; allowed values are either512,1024,2048or4096.
-C, --connections <number>Number of connections to the server, increasing throughput and reducing latency at the cost of higher resource usage. Requires Linux 4.9+.
-N, --name <name>Configure the export name, defaults to
default.
-p, --persistConfigure if the client should always reconnect if the connection is unexpectedly dropped.
-c, --checkConfigure if the client should quit with an exit code of
0if the NBD device is attached or1if the NBD device is not attached.
-h, --helpDisplay help.
Install using
npm install nbd-client
import { NBD } from 'nbd-client'
const device = '/dev/nbd0'
if (await NBD.check(device)) {
throw new Error(`${device} is already attached`)
}
const client = new NBD({
device,
name: 'my-disk', // same as nbd-client --name
socket: { path: 'nbd-server.sock' }, // same options as net.createConnection()
persist: true, // same as nbd-client --persist
connections: 4, // same as nbd-client --connections
connected() {
console.log('Client connected')
},
})
// Stop the client after 5 seconds
setTimeout(() => client.stop(), 5000)
console.log('Connecting to NBD..')
// Start the client
await client.start()
console.log('Client stopped')
netlink interfaceFAQs
Linux NBD client and library for Node.js. Built to automate block storage systems.
We found that nbd-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.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.