Installation
npm install --save netshell
Usage
Code use example:
var netsh = require('netshell');
netsh.createRule({
name:'https',
dir:'out',
action:'block',
protocol: 'tcp',
remoteport:443
}).then((data) => {
console.log(data); // undefined
});
netsh.readRule({name:'https'})
.then((data) => {
console.log(data); // rule
});
netsh.updateRule({name:'https'}, {action:'allow'})
.then((data) => {
console.log(data);
});
netsh.deleteRule({name:'https'})
.then((data) => {
console.log(data);
});