{
  "manifest": {
    "name": "default-gateway",
    "version": "6.0.3",
    "description": "Get the default network gateway, cross-platform.",
    "author": {
      "name": "silverwind"
    },
    "repository": {
      "type": "git",
      "url": "https://github.com/silverwind/default-gateway.git"
    },
    "license": "BSD-2-Clause",
    "main": "index.js",
    "engines": {
      "node": ">= 10"
    },
    "files": [
      "index.js",
      "android.js",
      "darwin.js",
      "freebsd.js",
      "linux.js",
      "openbsd.js",
      "sunos.js",
      "win32.js",
      "ibmi.js"
    ],
    "dependencies": {
      "execa": "^5.0.0"
    },
    "devDependencies": {
      "eslint": "7.17.0",
      "eslint-config-silverwind": "27.0.0",
      "jest": "26.6.3",
      "updates": "11.4.2",
      "versions": "8.4.4"
    },
    "keywords": [
      "default gateway",
      "network",
      "default",
      "gateway",
      "routing",
      "route"
    ],
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-default-gateway-6.0.3-819494c888053bdb743edbf343d6cdf7f2943a71-integrity/node_modules/default-gateway/package.json",
    "readmeFilename": "README.md",
    "readme": "# default-gateway\n[![](https://img.shields.io/npm/v/default-gateway.svg?style=flat)](https://www.npmjs.org/package/default-gateway) [![](https://img.shields.io/npm/dm/default-gateway.svg)](https://www.npmjs.org/package/default-gateway)\n\nObtains the machine's default gateway through `exec` calls to OS routing interfaces.\n\n- On Linux and Android, the `ip` command must be available (usually provided by the `iproute2` package).\n- On Windows, `wmic` must be available.\n- On IBM i, the `db2util` command must be available (provided by the `db2util` package).\n- On Unix (and macOS), the `netstat` command must be available.\n\n## Installation\n\n```\n$ npm i default-gateway\n```\n\n## Example\n\n```js\nconst defaultGateway = require('default-gateway');\n\nconst {gateway, interface} = await defaultGateway.v4();\n// gateway = '1.2.3.4', interface = 'en1'\n\nconst {gateway, interface} = await defaultGateway.v6();\n// gateway = '2001:db8::1', interface = 'en2'\n\nconst {gateway, interface} = defaultGateway.v4.sync();\n// gateway = '1.2.3.4', interface = 'en1'\n\nconst {gateway, interface} = defaultGateway.v6.sync();\n// gateway = '2001:db8::1', interface = 'en2'\n```\n\n## API\n### defaultGateway.v4()\n### defaultGateway.v6()\n### defaultGateway.v4.sync()\n### defaultGateway.v6.sync()\n\nReturns: `result` *Object*\n  - `gateway`: The IP address of the default gateway.\n  - `interface`: The name of the interface. On Windows, this is the network adapter name.\n\nThe `.v{4,6}()` methods return a Promise while the `.v{4,6}.sync()` variants will return the result synchronously.\n\nThe `gateway` property will always be defined on success, while `interface` can be `null` if it cannot be determined. All methods reject/throw on unexpected conditions.\n\n## License\n\n© [silverwind](https://github.com/silverwind), distributed under BSD licence\n",
    "licenseText": "Copyright (c) silverwind\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz",
    "hash": "819494c888053bdb743edbf343d6cdf7f2943a71",
    "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==",
    "registry": "npm",
    "packageName": "default-gateway",
    "cacheIntegrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== sha1-gZSUyIgFO9t0PtvzQ9bN9/KUOnE="
  },
  "registry": "npm",
  "hash": "819494c888053bdb743edbf343d6cdf7f2943a71"
}