Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tc-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tc-wrapper - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

46

dist/index.js

@@ -252,3 +252,3 @@ 'use strict';

var actions = [this.del()];
var actions = [this.del];

@@ -260,33 +260,39 @@ // Store ids for multiple ruling

// Iterate over all outgoing rules and set them
actions.push(_bluebird2.default.mapSeries(Object.keys(rules.outgoing), function (rule) {
var tcRuler = _this2._genTCRuler(_this2.device, 'outgoing', rule, rules.outgoing[rule], qdiscMinorId, netemMajorId);
actions.push(function () {
return _bluebird2.default.mapSeries(Object.keys(rules.outgoing), function (rule) {
var tcRuler = _this2._genTCRuler(_this2.device, 'outgoing', rule, rules.outgoing[rule], qdiscMinorId, netemMajorId);
return tcRuler.executeRules().then(function () {
qdiscMinorId = tcRuler.qdiscMinorId;
netemMajorId = tcRuler.netemMajorId;
return tcRuler.executeRules().then(function () {
qdiscMinorId = tcRuler.qdiscMinorId;
netemMajorId = tcRuler.netemMajorId;
});
});
}));
});
if (rules.incoming && Object.keys(rules.incoming).length > 0) {
actions.push(this._enableIfbDevice());
actions.push(this._enableIfbDevice);
// Clean ids...
actions.push(new _bluebird2.default(function (resolve) {
qdiscMinorId = undefined;
netemMajorId = undefined;
resolve(null);
}));
actions.push(function () {
return new _bluebird2.default(function (resolve) {
qdiscMinorId = undefined;
netemMajorId = undefined;
resolve(null);
});
});
}
// Iterate over all incoming rules and set them
actions.push(_bluebird2.default.mapSeries(Object.keys(rules.incoming), function (rule) {
var tcRuler = _this2._genTCRuler(_this2.ifbDevice, 'incoming', rule, rules.incoming[rule], qdiscMinorId, netemMajorId);
actions.push(function () {
return _bluebird2.default.mapSeries(Object.keys(rules.incoming), function (rule) {
var tcRuler = _this2._genTCRuler(_this2.ifbDevice, 'incoming', rule, rules.incoming[rule], qdiscMinorId, netemMajorId);
return tcRuler.executeRules().then(function () {
qdiscMinorId = tcRuler.qdiscMinorId;
netemMajorId = tcRuler.netemMajorId;
return tcRuler.executeRules().then(function () {
qdiscMinorId = tcRuler.qdiscMinorId;
netemMajorId = tcRuler.netemMajorId;
});
});
}));
});
return _bluebird2.default.mapSeries(actions, function (action) {
return action;
return action.bind(_this2)();
});

@@ -293,0 +299,0 @@ }

{
"name": "tc-wrapper",
"version": "1.0.4",
"version": "1.0.5",
"description": "NodeJS wrapper for tc command (traffic control on linux)",

@@ -5,0 +5,0 @@ "author": "J. Victor Soto",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc