
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
brctl-wrapper
Advanced tools
Simple wrapper for brctl of Linux (virtual bridges).
This module is installed via npm:
npm install --save brctl-wrapper
import brtcl from 'brtcl-wrapper';
brctl.createBridge('myBridge')
.then(() => {
Promise.all(['eth0', 'eth1'].map(i => brctl.addIfaceToBridge(i, 'miBridge')))
.then(() => {
brctl.enableBridge('miBridge')
.then(() => {
// ----- Bridge is up!
})
.catch(err => console.error('Impossible to enable bridge: ', err));
})
.catch(err => console.error('Error adding ifaces to bridge: ', err));
})
.catch(err => console.error('Error creating bridge: ', err));
import brtcl from 'brtcl-wrapper';
const bridgeOptions = {
ifaces: ['eth0', 'eth1'],
enable: true
};
brctl.createBridge('myBridge', bridgeOptions)
.then(() => {
// ----- Bridge is up!
})
.catch(err => console.error('Error creating bridge: ', err));
import brtcl from 'brtcl-wrapper';
const bridgeOptions = {
ifaces: ['eth0', 'eth1'],
enable: true,
ip: '10.255.1.22/24'
};
brctl.createBridge('myBridge', bridgeOptions)
.then(() => {
// ----- Bridge is up and with ip 10.255.1.22/24!
})
.catch(err => console.error('Error creating bridge: ', err));
import brtcl from 'brtcl-wrapper';
brctl.deleteBridge('myBridge')
.then(() => {
// ----- Bridge is disabled and destroyed!
})
.catch(err => console.error('Error destroying bridge: ', err));
This module uses debug for debugging, you can enable debug messages with:
DEBUG=brctl-wrapper
npm test
In case you never heard about the MIT license.
See the LICENSE file for details.
FAQs
NodeJS wrapper for brctl command (virtual bridges on linux)
The npm package brctl-wrapper receives a total of 0 weekly downloads. As such, brctl-wrapper popularity was classified as not popular.
We found that brctl-wrapper 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.