diff --git a/package-lock.json b/package-lock.json index cd70f1b..83a73ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -33,10 +33,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { @@ -69,7 +69,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "array-includes": { @@ -78,8 +78,8 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.11.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, "array-union": { @@ -88,7 +88,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -115,9 +115,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "chalk": { @@ -126,11 +126,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "strip-ansi": { @@ -139,7 +139,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -156,7 +156,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -178,7 +178,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -193,9 +193,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "dependencies": { "ansi-styles": { @@ -204,7 +204,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "supports-color": { @@ -213,7 +213,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } } } @@ -236,7 +236,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-width": { @@ -257,7 +257,7 @@ "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "^1.1.1" } }, "color-name": { @@ -278,10 +278,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "contains-path": { @@ -308,9 +308,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "debug": { @@ -340,8 +340,8 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "deglob": { @@ -350,12 +350,12 @@ "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", "dev": true, "requires": { - "find-root": "1.1.0", - "glob": "7.1.2", - "ignore": "3.3.8", - "pkg-config": "1.1.1", - "run-parallel": "1.1.9", - "uniq": "1.0.1" + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" } }, "del": { @@ -364,13 +364,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" } }, "doctrine": { @@ -379,7 +379,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "encoding": { @@ -388,7 +388,7 @@ "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "dev": true, "requires": { - "iconv-lite": "0.4.23" + "iconv-lite": "~0.4.13" } }, "error-ex": { @@ -397,7 +397,7 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -406,11 +406,11 @@ "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -419,9 +419,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "escape-string-regexp": { @@ -436,43 +436,43 @@ "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", "dev": true, "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.4.1", - "concat-stream": "1.6.2", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.5.0", - "ignore": "3.3.8", - "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.11.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.2", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", "table": "4.0.2", - "text-table": "0.2.0" + "text-table": "~0.2.0" } }, "eslint-config-semistandard": { @@ -499,8 +499,8 @@ "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "2.6.9", - "resolve": "1.7.1" + "debug": "^2.6.9", + "resolve": "^1.5.0" }, "dependencies": { "debug": { @@ -520,8 +520,8 @@ "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", "dev": true, "requires": { - "debug": "2.6.9", - "pkg-dir": "1.0.0" + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" }, "dependencies": { "debug": { @@ -541,16 +541,16 @@ "integrity": "sha512-Rf7dfKJxZ16QuTgVv1OYNxkZcsu/hULFnC+e+w0Gzi6jMC3guQoWQgxYxc54IDRinlb6/0v5z/PxxIKmVctN+g==", "dev": true, "requires": { - "builtin-modules": "1.1.1", - "contains-path": "0.1.0", - "debug": "2.6.9", + "builtin-modules": "^1.1.1", + "contains-path": "^0.1.0", + "debug": "^2.6.8", "doctrine": "1.5.0", - "eslint-import-resolver-node": "0.3.2", - "eslint-module-utils": "2.2.0", - "has": "1.0.1", - "lodash.cond": "4.5.2", - "minimatch": "3.0.4", - "read-pkg-up": "2.0.0" + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.1.1", + "has": "^1.0.1", + "lodash.cond": "^4.3.0", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0" }, "dependencies": { "debug": { @@ -568,8 +568,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } } } @@ -580,10 +580,10 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.8", - "minimatch": "3.0.4", - "resolve": "1.7.1", - "semver": "5.5.0" + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" } }, "eslint-plugin-promise": { @@ -598,10 +598,10 @@ "integrity": "sha512-30aMOHWX/DOaaLJVBHz6RMvYM2qy5GH63+y2PLFdIrYe4YLtODFmT3N1YA7ZqUnaBweVbedr4K4cqxOlWAPjIw==", "dev": true, "requires": { - "doctrine": "2.1.0", - "has": "1.0.1", - "jsx-ast-utils": "2.0.1", - "prop-types": "15.6.1" + "doctrine": "^2.0.2", + "has": "^1.0.1", + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.0" } }, "eslint-plugin-standard": { @@ -616,8 +616,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { @@ -632,8 +632,8 @@ "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "5.5.3", - "acorn-jsx": "3.0.1" + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" } }, "esprima": { @@ -648,7 +648,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -657,7 +657,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -678,9 +678,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.23", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "fast-deep-equal": { @@ -707,13 +707,13 @@ "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", "dev": true, "requires": { - "core-js": "1.2.7", - "isomorphic-fetch": "2.2.1", - "loose-envify": "1.3.1", - "object-assign": "4.1.1", - "promise": "7.3.1", - "setimmediate": "1.0.5", - "ua-parser-js": "0.7.18" + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.9" } }, "figures": { @@ -722,7 +722,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -731,8 +731,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "find-root": { @@ -747,8 +747,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "flat-cache": { @@ -757,10 +757,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "foreach": { @@ -799,12 +799,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "globals": { @@ -819,12 +819,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "graceful-fs": { @@ -839,7 +839,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -848,7 +848,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -869,7 +869,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { @@ -890,8 +890,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -906,20 +906,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.10", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" } }, "is-arrayish": { @@ -934,7 +934,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -967,7 +967,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -976,7 +976,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-promise": { @@ -991,7 +991,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.1" + "has": "^1.0.1" } }, "is-resolvable": { @@ -1030,8 +1030,8 @@ "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", "dev": true, "requires": { - "node-fetch": "1.7.3", - "whatwg-fetch": "2.0.4" + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" } }, "js-tokens": { @@ -1046,8 +1046,8 @@ "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "json-parse-better-errors": { @@ -1074,7 +1074,7 @@ "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", "dev": true, "requires": { - "array-includes": "3.0.3" + "array-includes": "^3.0.3" } }, "levn": { @@ -1083,8 +1083,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -1093,10 +1093,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" } }, "locate-path": { @@ -1105,8 +1105,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -1135,7 +1135,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -1144,8 +1144,8 @@ "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "mimic-fn": { @@ -1160,7 +1160,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1190,20 +1190,32 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, + "nan": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "nfqueue": { + "version": "git+https://github.com/dmblack/node-nfqueue.git#67a52cacd934d04c958fdeca9a35e0f04cc6b59f", + "from": "git+https://github.com/dmblack/node-nfqueue.git", + "requires": { + "nan": "^2.10.0" + } + }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "dev": true, "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" + "encoding": "^0.1.11", + "is-stream": "^1.0.1" } }, "normalize-package-data": { @@ -1212,10 +1224,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "object-assign": { @@ -1236,7 +1248,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -1245,7 +1257,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optionator": { @@ -1254,12 +1266,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "os-tmpdir": { @@ -1274,7 +1286,7 @@ "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -1283,7 +1295,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -1298,7 +1310,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1307,7 +1319,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1334,7 +1346,15 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" + } + }, + "pcap": { + "version": "git+https://github.com/dmblack/node_pcap.git#b4eb828fbfb3ad9a253351aa38cb41c203589712", + "from": "git+https://github.com/dmblack/node_pcap.git", + "requires": { + "nan": "^2.0.9", + "socketwatcher": "^0.3.0" } }, "pify": { @@ -1355,7 +1375,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-conf": { @@ -1364,8 +1384,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "find-up": { @@ -1374,7 +1394,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "load-json-file": { @@ -1383,10 +1403,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "parse-json": { @@ -1395,8 +1415,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "pify": { @@ -1413,9 +1433,9 @@ "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", "dev": true, "requires": { - "debug-log": "1.0.1", - "find-root": "1.1.0", - "xtend": "4.0.1" + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" } }, "pkg-dir": { @@ -1424,7 +1444,7 @@ "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" } }, "pluralize": { @@ -1457,7 +1477,7 @@ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "dev": true, "requires": { - "asap": "2.0.6" + "asap": "~2.0.3" } }, "prop-types": { @@ -1466,9 +1486,9 @@ "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", "dev": true, "requires": { - "fbjs": "0.8.16", - "loose-envify": "1.3.1", - "object-assign": "4.1.1" + "fbjs": "^0.8.16", + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" } }, "pseudomap": { @@ -1483,9 +1503,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" } }, "read-pkg-up": { @@ -1494,8 +1514,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" }, "dependencies": { "find-up": { @@ -1504,7 +1524,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } } } @@ -1515,13 +1535,13 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "require-uncached": { @@ -1530,8 +1550,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" } }, "resolve": { @@ -1540,7 +1560,7 @@ "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-from": { @@ -1555,8 +1575,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "rimraf": { @@ -1565,7 +1585,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -1574,7 +1594,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "run-parallel": { @@ -1595,7 +1615,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "4.0.8" + "rx-lite": "*" } }, "safe-buffer": { @@ -1616,16 +1636,16 @@ "integrity": "sha512-+FBRXBCi8GC1Nivc4ruw2KXER31bE1lrNyESo7prn2Sv9I9+H/Iqpt0NOtlV/GUxq34AgJwJViBUpA3/PUGqOw==", "dev": true, "requires": { - "eslint": "4.18.2", + "eslint": "~4.18.0", "eslint-config-semistandard": "12.0.1", "eslint-config-standard": "11.0.0", "eslint-config-standard-jsx": "5.0.0", - "eslint-plugin-import": "2.8.0", - "eslint-plugin-node": "6.0.1", - "eslint-plugin-promise": "3.6.0", - "eslint-plugin-react": "7.6.1", - "eslint-plugin-standard": "3.0.1", - "standard-engine": "8.0.1" + "eslint-plugin-import": "~2.8.0", + "eslint-plugin-node": "~6.0.0", + "eslint-plugin-promise": "~3.6.0", + "eslint-plugin-react": "~7.6.1", + "eslint-plugin-standard": "~3.0.1", + "standard-engine": "~8.0.0" } }, "semver": { @@ -1646,7 +1666,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -1667,7 +1687,15 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" + } + }, + "socketwatcher": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/socketwatcher/-/socketwatcher-0.3.0.tgz", + "integrity": "sha1-SeVhQFj8qrGdZAs3QiWk7qS0t4o=", + "requires": { + "nan": "^2.0.9" } }, "spdx-correct": { @@ -1676,8 +1704,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -1692,8 +1720,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -1714,10 +1742,10 @@ "integrity": "sha512-LA531C3+nljom/XRvdW/hGPXwmilRkaRkENhO3FAGF1Vtq/WtCXzgmnc5S6vUHHsgv534MRy02C1ikMwZXC+tw==", "dev": true, "requires": { - "deglob": "2.1.0", - "get-stdin": "6.0.0", - "minimist": "1.2.0", - "pkg-conf": "2.1.0" + "deglob": "^2.1.0", + "get-stdin": "^6.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" }, "dependencies": { "minimist": { @@ -1734,8 +1762,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "string_decoder": { @@ -1744,7 +1772,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -1753,7 +1781,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" }, "dependencies": { "ansi-regex": { @@ -1788,12 +1816,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.4.1", - "lodash": "4.17.10", + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" } }, "text-table": { @@ -1814,7 +1842,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "type-check": { @@ -1823,7 +1851,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "typedarray": { @@ -1856,8 +1884,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "whatwg-fetch": { @@ -1872,7 +1900,7 @@ "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "wordwrap": { @@ -1893,7 +1921,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "xtend": { diff --git a/src/config/interfaces.json b/src/config/interfaces.json index c66eded..e942e49 100644 --- a/src/config/interfaces.json +++ b/src/config/interfaces.json @@ -4,13 +4,13 @@ "lo": { "zone": "trusted" }, - "enp2s0f0": { + "enp0s25": { "zone": "untrusted" }, - "ppp0": { + "tun0": { "zone": "trusted" }, - "wlp3s0b1": { + "wlo1": { "zone": "untrusted" } } diff --git a/src/config/rules-base.nft b/src/config/rules-base.nft index 0fcfcf0..60f3725 100644 --- a/src/config/rules-base.nft +++ b/src/config/rules-base.nft @@ -4,13 +4,14 @@ table ip filter { chain input { type filter hook input priority 0; policy drop; counter; + ct state { established, related } counter accept; meta mark 666 counter drop comment "NodeJS Rejected"; meta mark 9999 counter comment "NodeJS Accepted - LOGGING"; meta mark 999 counter accept comment "NodeJS Accepted"; ct state { invalid, untracked } counter drop; counter; } - + chain output { type filter hook output priority 0; policy drop; counter; diff --git a/src/config/rules.json b/src/config/rules.json index 11a1fc7..968503f 100644 --- a/src/config/rules.json +++ b/src/config/rules.json @@ -5,73 +5,65 @@ "_1": "ICMP", "1": { "global": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" }, "trusted": { - "allowed": true, - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } }, "_2": "IGMP", "2": { "global": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" }, "trusted": { - "allowed": true, - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } }, "_6": "TCP", "6": { "global": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" }, "trusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "accept", + "ports": { + "8953": { + "policy": "accept" + }, + "8955": { + "policy": "accept" + } + } }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } }, "_17": "UDP", "17": { "global": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" }, "trusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "accept", + "ports": { + "53": { + "policy": "accept" + }, + "8953": { + "policy": "accept" + } + } }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } } }, @@ -79,173 +71,133 @@ "_1": "ICMP", "1": { "global": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" }, "trusted": { - "allowed": true, - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } }, "_2": "IGMP", "2": { "global": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" }, "trusted": { - "allowed": true, - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } }, "_6": "TCP", "6": { "global": { - "allowed": true, - "acceptAction": null, - "rejectAction": null, + "policy": "accept", "ports": { "443": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "993": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" } } }, "trusted": { - "allowed": true, - "acceptAction": null, - "rejectAction": null, + "policy": "accept", "ports": { "22": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "80": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "139": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "445": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "465": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "1880": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "1900": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "2083": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "2087": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "2096": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "3142": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "9092": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" } } }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } }, "_17": "UDP", "17": { "global": { - "allowed": true, - "acceptAction": null, - "rejectAction": null, + "policy": "reject", "ports": { - "53": { - "acceptAction": null, - "rejectAction": null - }, "500": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" + }, + "1194": { + "policy": "accept" }, "1701": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "4500": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" } } }, "trusted": { - "allowed": true, - "acceptAction": null, - "rejectAction": null, + "policy": "accept", "ports": { + "53": { + "policy": "accept" + }, "123": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "137": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "138": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "1900": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" }, "5353": { - "acceptAction": null, - "rejectAction": null + "policy": "accept" + }, + "9981": { + "policy": "accept", + "action": "log" } } }, "untrusted": { - "allowed": false, - "acceptAction": null, - "rejectAction": null + "policy": "reject" } } } diff --git a/src/config/rules.json.original b/src/config/rules.json.original new file mode 100644 index 0000000..11a1fc7 --- /dev/null +++ b/src/config/rules.json.original @@ -0,0 +1,253 @@ +{ + "detail": "This file should be copied into './config/' and setup as necessary.", + "rules": { + "incoming": { + "_1": "ICMP", + "1": { + "global": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "trusted": { + "allowed": true, + "acceptAction": null, + "rejectAction": null + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + }, + "_2": "IGMP", + "2": { + "global": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "trusted": { + "allowed": true, + "acceptAction": null, + "rejectAction": null + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + }, + "_6": "TCP", + "6": { + "global": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "trusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + }, + "_17": "UDP", + "17": { + "global": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "trusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + } + }, + "outgoing": { + "_1": "ICMP", + "1": { + "global": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "trusted": { + "allowed": true, + "acceptAction": null, + "rejectAction": null + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + }, + "_2": "IGMP", + "2": { + "global": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + }, + "trusted": { + "allowed": true, + "acceptAction": null, + "rejectAction": null + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + }, + "_6": "TCP", + "6": { + "global": { + "allowed": true, + "acceptAction": null, + "rejectAction": null, + "ports": { + "443": { + "acceptAction": null, + "rejectAction": null + }, + "993": { + "acceptAction": null, + "rejectAction": null + } + } + }, + "trusted": { + "allowed": true, + "acceptAction": null, + "rejectAction": null, + "ports": { + "22": { + "acceptAction": null, + "rejectAction": null + }, + "80": { + "acceptAction": null, + "rejectAction": null + }, + "139": { + "acceptAction": null, + "rejectAction": null + }, + "445": { + "acceptAction": null, + "rejectAction": null + }, + "465": { + "acceptAction": null, + "rejectAction": null + }, + "1880": { + "acceptAction": null, + "rejectAction": null + }, + "1900": { + "acceptAction": null, + "rejectAction": null + }, + "2083": { + "acceptAction": null, + "rejectAction": null + }, + "2087": { + "acceptAction": null, + "rejectAction": null + }, + "2096": { + "acceptAction": null, + "rejectAction": null + }, + "3142": { + "acceptAction": null, + "rejectAction": null + }, + "9092": { + "acceptAction": null, + "rejectAction": null + } + } + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + }, + "_17": "UDP", + "17": { + "global": { + "allowed": true, + "acceptAction": null, + "rejectAction": null, + "ports": { + "53": { + "acceptAction": null, + "rejectAction": null + }, + "500": { + "acceptAction": null, + "rejectAction": null + }, + "1701": { + "acceptAction": null, + "rejectAction": null + }, + "4500": { + "acceptAction": null, + "rejectAction": null + } + } + }, + "trusted": { + "allowed": true, + "acceptAction": null, + "rejectAction": null, + "ports": { + "123": { + "acceptAction": null, + "rejectAction": null + }, + "137": { + "acceptAction": null, + "rejectAction": null + }, + "138": { + "acceptAction": null, + "rejectAction": null + }, + "1900": { + "acceptAction": null, + "rejectAction": null + }, + "5353": { + "acceptAction": null, + "rejectAction": null + } + } + }, + "untrusted": { + "allowed": false, + "acceptAction": null, + "rejectAction": null + } + } + } + } +} diff --git a/src/index.js b/src/index.js index a865d94..cc8758b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,6 @@ +// +// Rewrite to enable nodewatch CD +// const sysClassNetInterfaces = '/sys/class/net/'; const fs = require('fs'); const nfq = require('nfqueue'); @@ -12,8 +15,8 @@ const buffer = 131070; process.stdout.write('\x1Bc'); -let rules = require('./../config/rules.json').rules; -let systemInterfaces = require('./../config/interfaces.json').interfaces; +let rules = require('./config/rules.json').rules; +let systemInterfaces = require('./config/interfaces.json').interfaces; fs.watch('./config', checkConfig); @@ -123,7 +126,127 @@ function handleActions (action, packet) { } } -function handlePacket (packet) { +function handlePacket1(packet) { + // Set our default action (Reject!)Reject + rule = getRule(packet); + packet.verdict = typeof(rule) === 'undefined' + ? packet.enums.netfilterVerdict.NF_REJECT + : packet.enums.netfilterVerdict[rule.policy]; + + console.log(rule); + packet.action = typeof (rule) === 'undefined' + ? undefined + : rule.action; + + packet.action = undefined; + + if (typeof(getRule(packet)) !== 'undefined') { + packet.verdict = getRule(packet) + } + + return packet.verdicts.getVerdict(); +} + +const findRule = (packet) => { + // direction + // protocol + // zone + // *port (not applicable for some protocols) + const direction = packet.direction; + const protocol = packet.nfpacketDecoded.protocol.toString(); + const zone = packet.networkInterface.zone || 'untrusted'; + const targetPort = packet.nfpacketDecoded.payload.dport || undefined; + const sourcePort = packet.nfpacketDecoded.payload.sport || undefined; + const flags = packet.nfpacketDecoded.payload.flags || undefined; + packet.verdict = undefined; + + // Check if related connection + if (targetPort && sourcePort) { + // catch explicit rule direction, protocol, zone, and port + if (rules[direction] && rules[direction][protocol] && rules[direction][protocol][zone] && rules[direction][protocol][zone].ports) { + packet.verdict = rules[direction][protocol][zone].ports[targetPort] + ? packet.enums.ruleVerdict[rules[direction][protocol][zone].ports[targetPort].policy] + : undefined; + packet.action = rules[direction][protocol][zone].ports[targetPort] + ? rules[direction][protocol][zone].ports[targetPort].action + : undefined; + } + + if (typeof(packet.verdict) !== 'undefined') { + console.log('We found an explicit rule for direction: %s, zone: %s, protocol: %s, target port: %s', direction, zone, protocol, targetPort); + } + + + + // Catch 'global' zone policy + if (rules[direction] && rules[direction][protocol] && rules[direction][protocol].global && typeof(packet.verdict) === 'undefined') { + if (rules[direction][protocol].global.ports) { + packet.verdict = rules[direction][protocol].global.ports[targetPort] + ? packet.enums.ruleVerdict[rules[direction][protocol].global.ports[targetPort].policy] + : undefined; + packet.action = rules[direction][protocol].global.ports[targetPort] + ? rules[direction][protocol].global.ports[targetPort].action + : undefined; + } else { + packet.verdict = rules[direction][protocol].global + ? packet.enums.ruleVerdict[rules[direction][protocol].global.policy] + : undefined; + packet.action = rules[direction][protocol].global + ? rules[direction][protocol].global.action + : undefined; + } + if (typeof(packet.verdict) !== 'undefined') { + console.log('We found a global rule for direction: %s, zone: %s, protocol: %s, target port: %s', direction, zone, protocol, targetPort); + } + + } + + // Catch 'zone' default policy (Eg; trusted; accept) + if (rules[direction] && rules[direction][protocol] && rules[direction][protocol][zone] && typeof(packet.verdict) === 'undefined') { + packet.verdict = rules[direction][protocol][zone] + ? packet.enums.ruleVerdict[rules[direction][protocol][zone].policy] + : undefined; + packet.action = rules[direction][protocol][zone] + ? rules[direction][protocol][zone].action + : undefined; + if (typeof(packet.verdict) !== 'undefined') { + console.log('We found a default zone policy for direction: %s, zone: %s, protocol: %s, target port: %s', direction, zone, protocol, targetPort); + } + } + + } else { + if (rules[direction] && rules[direction][protocol] && rules[direction][protocol][zone] && typeof(packet.verdict) === 'undefined') { + packet.verdict = rules[direction][protocol][zone] + ? packet.enums.ruleVerdict[rules[direction][protocol][zone].policy] + : undefined; + packet.action = rules[direction][protocol][zone] + ? rules[direction][protocol][zone].action + : undefined; + } else if (rules[direction] && rules[direction][protocol] && rules[direction][protocol].global && typeof(packet.verdict) === 'undefined') { + packet.verdict= rules[direction][protocol].global + ? packet.enums.ruleVerdict[rules[direction][protocol].global.policy] + : undefined; + packet.action = rules[direction][protocol].global + ? rules[direction][protocol].global.action + : undefined; + } + } + + + if (typeof(packet.verdict) === 'unefined') { + console.log('We did not find a rule for zone: %s, direction %s, protocol, %s, packet target port: %s', zone, direction, protocol, targetPort); + } else { + console.log('Verdict: %s', packet.verdict) + } +} + +function handlePacket(packet) { + findRule(packet); + if (packet.action) { handleActions(packet.action, packet) } + return packet.verdicts.getVerdict(); +} + +function noLongerUsed(packet) { // Check we even handle this protocol if (rules[packet.direction][packet.nfpacketDecoded.protocol.toString()]) { // Check if the global (blanket) rule applies @@ -157,6 +280,10 @@ function handlePacket (packet) { // packet.nfpacket.setVerdict(packet.verdict, packet.mark); } // Else, as if globally accepted we don't need to traverse other zones. + // Correction; We need to handle globally 'rejected' rules.. + // Propose a rewite of how rules are determined and handled - associated with actions; + // Find most appropriate rule (regardless of policy) + // Return that rule, and it's association actions etc. } // Check if the protocol is zone allowed. if (rules[packet.direction][packet.nfpacketDecoded.protocol.toString()][packet.networkInterface.zone].policy && rules[packet.direction][packet.nfpacketDecoded.protocol.toString()][packet.networkInterface.zone].policy === 'allow') { @@ -290,4 +417,4 @@ nft.flush().then( (err) => console.log('Failed to insert final counters: ' + err) ); -setInterval(updateOutput, 250); +setInterval(updateOutput, 250000); diff --git a/src/nfpacket/enums.js b/src/nfpacket/enums.js index 176d019..4bc01cb 100644 --- a/src/nfpacket/enums.js +++ b/src/nfpacket/enums.js @@ -1,3 +1,32 @@ +const netfilterVerdict = { + NF_DROP: 0, + NF_ACCEPT: 1, + NF_STOLEN: 2, + NF_QUEUE: 3, + NF_REPEAT: 4, + NF_STOP: 5 +} + +const protocols = { + PC_ICMP: 1, + PC_IGMP: 2, + PC_TCP: 6, + PC_UDP: 17 +} + +const ruleVerdict = { + accept: netfilterVerdict.NF_ACCEPT, + drop: netfilterVerdict.NF_DROP, + reject: netfilterVerdict.NF_DROP +} + +module.exports = { + netfilterVerdict, + protocols, + ruleVerdict +} + + /* module.exports = { netfilterVerdict: { // These are the NFQUEUE result handler options. @@ -15,5 +44,11 @@ module.exports = { PC_IGMP: 2, PC_TCP: 6, PC_UDP: 17 + }, + ruleVerdict: { + accept: this.netfilterVerdict.NF_ACCEPT, + drop: this.netfilterVerdict.NF_DROP, + reject: this.netfilterVerdict.NF_DROP } }; +*/ diff --git a/src/nfpacket/verdicts.js b/src/nfpacket/verdicts.js index 55da7ce..926d9ef 100644 --- a/src/nfpacket/verdicts.js +++ b/src/nfpacket/verdicts.js @@ -4,8 +4,14 @@ module.exports = (dependencies) => (state) => ({ ? state.nfpacket.setVerdict(state.enums.netfilterVerdict.NF_ACCEPT, state.mark) : false; }, + deny: () => { + // Should alias to reject.. + return state.nfpacket + ? state.nfpacket.setVerdict(state.enums.netfilterVerdict.NF_DROP, state.mark) + : false; + }, reject: () => { - // This allows us to admin-prohibit and immediately reject outgoing, intead of droop (timeout). + // This allows us to admin-prohibit and immediately reject outgoing, intead of drop (timeout). if (state.direction === 'outgoing') { return state.nfpacket.setVerdict(state.enums.netfilterVerdict.NF_REPEAT, 777); } else {