ip-wrapper
v1.1.1
Published
A simple wrapper around the ip command
Downloads
50
Readme
IP Wrapper
Overview
IP Wrapper is a Node.js library that provides functions for managing network interfaces and IP addresses on a Linux system using the ip
command.
Installation
To install the library, use npm:
npm install ip-wrapper
Usage
const ipWrapper = require('ip-wrapper');
(async () => {
const addresses = await ipWrapper.addr.show();
await ipWrapper.addr.add('enp6s0', '6.6.6.6/32');
await ipWrapper.addr.remove('enp6s0', '6.6.6.6/32');
await ipWrapper.addr.flush('enp6s0');
})();
Examples
All examples are located in the examples
directory.
Tests
We use Jest for testing. To run the tests, use the following command:
npm run test
LICENSE
View the LICENSE.md file.