{"name":"internal-ip","version":"8.0.1","keywords":["ip","ipv6","ipv4","address","internal","local","machine","system","net","gateway"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"internal-ip@8.0.1","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/internal-ip#readme","bugs":{"url":"https://github.com/sindresorhus/internal-ip/issues"},"dist":{"shasum":"703ed4cd94153c3152826fa810dc53cea2eeda0b","tarball":"http://registry-npm.ywwl.com/internal-ip/download/internal-ip-8.0.1.tgz","fileCount":7,"integrity":"sha512-UBBMBk8f1PrIHUXOPI/6vW0eFWhZl/UGHpNaqLAAOANNZxkGuqq/IDfk2goQ902E9hy1mtM7iXhdgZCpCceeew==","signatures":[{"sig":"MEYCIQConWX12djqgFImAGmjclL/dyaGccMN9+SxO5M3fySongIhAJzpRnSqcbozKi9UcXs1sb1CppO+bnNN3ggSZbjo/K5U","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7352,"size":2771,"noattachment":false,"key":"/internal-ip/-/internal-ip-8.0.1.tgz"},"type":"module","types":"./index.d.ts","engines":{"node":">=16"},"exports":{"node":"./index.js","types":"./index.d.ts","default":"./browser.js"},"funding":"https://github.com/sindresorhus/internal-ip?sponsor=1","gitHead":"b3a2abc044b0e2ef89926121559804da819799ab","scripts":{"test":"xo && node --experimental-test-module-mocks --test && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/internal-ip.git","type":"git"},"_npmVersion":"10.9.2","description":"Get your internal IP address","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"is-ip":"^5.0.0","p-event":"^5.0.1","cidr-tools":"^6.4.1","default-gateway":"^7.2.2"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.54.2","tsd":"^0.28.1"},"_npmOperationalInternal":{"tmp":"tmp/internal-ip_8.0.1_1758039695366_0.7989264422877542","host":"s3://npm-registry-packages-npm-production"},"readme":"# internal-ip\n\n> Get your internal IP address\n\n## Install\n\n```sh\nnpm install internal-ip\n```\n\n## Usage\n\n```js\nimport {internalIpV6, internalIpV4} from 'internal-ip';\n\nconsole.log(await internalIpV6());\n//=> 'fe80::1'\n\nconsole.log(await internalIpV4());\n//=> '10.0.0.79'\n```\n\n## API\n\nThe async functions use a UDP connection to determine the address of the internet-facing interface (no packets are sent). When that fails (for example, when offline), it falls back to scanning `os.networkInterfaces()`. The sync functions always use `os.networkInterfaces()`. If multiple non-internal interfaces are present and the internet-facing interface cannot be determined, `undefined` will be returned to avoid selecting the wrong interface.\n\n`internalIpV6Sync()` and `internalIpV4Sync()` are not supported in browsers and just return `undefined`.\n\n### internalIpV6()\n\nReturns the internal IPv6 address asynchronously.\n\n### internalIpV4()\n\nReturns the internal IPv4 address asynchronously.\n\n### internalIpV6Sync()\n\nReturns the internal IPv6 address synchronously.\n\n### internalIpV4Sync()\n\nReturns the internal IPv4 address synchronously.\n\n## Related\n\n- [internal-ip-cli](https://github.com/sindresorhus/internal-ip-cli) - CLI for this package\n- [public-ip](https://github.com/sindresorhus/public-ip) - Get your public IP address\n","publish_time":1758039695555,"_cnpm_publish_time":1758039695555,"dist-tags":{"latest":"9.0.0"}}