{"_id":"@d-fischer/public-ip","_rev":"2-7862bcdafa631f6e27148e076a8b4091","name":"@d-fischer/public-ip","dist-tags":{"latest":"4.0.3"},"versions":{"4.0.2":{"name":"@d-fischer/public-ip","version":"4.0.2","description":"Get your public IP address - very fast!","license":"MIT","repository":{"type":"git","url":"git+https://github.com/d-fischer/public-ip.git"},"author":{"name":"Daniel Fischer","email":"daniel@d-fischer.dev"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava test.js && tsd"},"keywords":["get","ip","ipv4","ipv6","address","external","public","machine","fast","opendns","dns"],"dependencies":{"dns-socket":"^4.2.0","got":"^9.6.0","is-ip":"^3.1.0"},"devDependencies":{"ava":"^2.2.0","sinon":"^7.4.1","tsd":"^0.11.0","xo":"^0.25.3"},"browser":"browser.js","module":"index.mjs","exports":{".":{"require":"./index.js","import":"./index.mjs"}},"xo":{"envs":["node","browser"]},"gitHead":"4156c6f7e90a72352a309ce2e6f70e4d379c67c7","bugs":{"url":"https://github.com/d-fischer/public-ip/issues"},"homepage":"https://github.com/d-fischer/public-ip#readme","_id":"@d-fischer/public-ip@4.0.2","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-j99gTzORehA2A42W+hLK8Sfa+YrsyA0pkWFo5SpBeOACNFZKIeHpcR6+CDY6L3UKudGMlhoYIyUctgT4MPUb9w==","shasum":"108fc82480d89c16ab5c8ad92963c5680cb388f0","tarball":"https://registry.npmjs.org/@d-fischer/public-ip/-/public-ip-4.0.2.tgz","fileCount":7,"unpackedSize":12796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqg/WCRA9TVsSAnZWagAAVTYP/2HWrrTeN9MBGRij8kVe\nsdpgtoUk9VEpHIVLMEvv50X1QZL4XhhxSIl0iDGxGlUDmyKK583Zdyx6FyxH\ndgli33ZCpOpMDzG8du/bxfzQZ8S0ajPTIt3GZsC1bLBc1+sAYCEyGPNpU1Zu\n3opJs4oJIC2rhZtdsVwAsmTTogT7MJrhW5clTtazaLa8Tp8JsbJYl5Pp17uX\nctp6iOwhwBL51JFtx8p9BffkqPCxgXEMSDUBdfj1ScmA8aqv9qKVyg5x0OP+\nJVdJJYRyD1cWZnjDwOiAADvE0yBjOT7lH93WpVN6ZOEDDyFgD1Mwsci4dY5V\nDixzfABBZh8gFT6Gq9jiFj0DZ684tFPyA/hAX2hBKM7W4ua5BHTu5r+sb87/\nnB6PLp429gjv4NKGIxkQlVe1WLhuVdpSOwFgd04cclQ1mgJ0SX7FnB+eMmcb\nz6w+HMt6tOgfSzRaAHvUK+O4NEDCbtcAiff4FA/vFdnuV2PPAGaC1wCcLDdE\ntf4q/DGQq3VNPC6+OqgoN4/yUQ3zTJQN0CXwxT575TTSJCwOL055Ar2IxAGj\nb4XOuxWT6K5fXL6EZY60VDbjiMdzvbOOGa9OK5OSjDBBZA5oAYHIuBR8rVMq\nM9TPvTMbGyFApdKN757vd/BIRxbiy89lGMBAygOFoT3jSoMb5Da3E5Wi6E4N\nP4f0\r\n=uXq/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHOa/Pzhikzcl6526TzRboYlx6gOzzbfEZ7EfOtetHPzAiAdqhDykZL8/3crk9o8FwXueTekaKMycbAF1SfCFa4h9g=="}]},"maintainers":[{"name":"d-fischer","email":"daniel@d-fischer.dev"}],"_npmUser":{"name":"d-fischer","email":"daniel@d-fischer.dev"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/public-ip_4.0.2_1588203477719_0.5480108519756828"},"_hasShrinkwrap":false},"4.0.3":{"name":"@d-fischer/public-ip","version":"4.0.3","description":"Get your public IP address - very fast!","license":"MIT","repository":{"type":"git","url":"git+https://github.com/d-fischer/public-ip.git"},"author":{"name":"Daniel Fischer","email":"daniel@d-fischer.dev"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava test.js && tsd"},"keywords":["get","ip","ipv4","ipv6","address","external","public","machine","fast","opendns","dns"],"dependencies":{"dns-socket":"^4.2.0","got":"^9.6.0","is-ip":"^3.1.0"},"devDependencies":{"ava":"^2.2.0","sinon":"^7.4.1","tsd":"^0.11.0","xo":"^0.25.3"},"browser":"browser.js","exports":{".":{"require":"./index.js","import":"./index.mjs"}},"xo":{"envs":["node","browser"]},"gitHead":"eefa573471b01e8e8638739fc6404d0b1f9f8933","bugs":{"url":"https://github.com/d-fischer/public-ip/issues"},"homepage":"https://github.com/d-fischer/public-ip#readme","_id":"@d-fischer/public-ip@4.0.3","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-XC9458VoRIQr0eeVaJxXkoB2VvGINh5fxB0+rSdEG9STXbCTmsX/h/9YZ9hfOwVBa4QROTQnWEFecwtkGILtTA==","shasum":"6b0efd7ecfef469894646059952146abeb8c9459","tarball":"https://registry.npmjs.org/@d-fischer/public-ip/-/public-ip-4.0.3.tgz","fileCount":7,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfecm6CRA9TVsSAnZWagAAMjAP/3uH5yrSbqzv1PnyIAb+\nQJg81qlDX9uSELArGrIsFJ1l171fDg8tmeuw+iJbdS+gDXymXk467wT7cosM\n0nxUuBc0mARgdRr4tCj9A2hylvN56xTJirsBcG8JxKzIJt6ChsHhSedtugoj\njPV2e/MFYKBBphcOXCLi5ivr+eKO5cbhEYRdACWCqNf5AYTGxlhoqDgSPjY7\nxGJAmolqkGCWt5+lwAJ3vksxylAu7rxT9vLZeg/yZHYambQMxolHbCYfViv1\nD+cNECvsJSkwaT6uK60hrjt8QXCpYhxfVYsQHL/NZWecodRjUUYmHKkOJlse\nCHeV+G8PLKa8q1DSC+ud2DjaUBbq3Yugi6XThkw4+rPShq5/5lwN/dEKYUN2\nhsw1wyBJX2xj+4MZ3QRp0UaKGMIJLDxdx2TZ+RH0e378tFpDA31WpTaEQFn1\nST2jYLht8SPfXCr9V761PUwnVzxzqsmoOksmbNHGVU84263YTt9J21vKG1iO\nBQuxDzkRkq2AVIEQCcUMuBQSRhYY1Jm5OMIJSy++8rCRZTif2sKJ9zRET7fo\nMJZMPca4HSI1jeOLbvXwFeiNN/nSfbti+0UtBX2MLGoF8q+dO2q+uNiVgf2e\n1W1MwmwMrPDyl0xLlMyWxxK7f29im5oUd+mlbG9t/FZ+cWB7q9mXt3UsBLoE\nqanq\r\n=7OP/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhWB/hRQborZnwYvDl9hOhnsfi9nkiwJdoLVJVkoeVkAIgDA1gVZqkB5YlEa2z1m0FgIlSudaxlvlU6S5sxb1wVoE="}]},"maintainers":[{"name":"d-fischer","email":"daniel@d-fischer.dev"}],"_npmUser":{"name":"d-fischer","email":"daniel@d-fischer.dev"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/public-ip_4.0.3_1601817018492_0.3955240404034317"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-29T23:37:57.674Z","4.0.2":"2020-04-29T23:37:57.818Z","modified":"2022-04-05T02:28:23.434Z","4.0.3":"2020-10-04T13:10:18.632Z"},"maintainers":[{"name":"d-fischer","email":"daniel@d-fischer.dev"}],"description":"Get your public IP address - very fast!","homepage":"https://github.com/d-fischer/public-ip#readme","keywords":["get","ip","ipv4","ipv6","address","external","public","machine","fast","opendns","dns"],"repository":{"type":"git","url":"git+https://github.com/d-fischer/public-ip.git"},"author":{"name":"Daniel Fischer","email":"daniel@d-fischer.dev"},"bugs":{"url":"https://github.com/d-fischer/public-ip/issues"},"license":"MIT","readme":"# public-ip [![Build Status](https://travis-ci.org/sindresorhus/public-ip.svg?branch=master)](https://travis-ci.org/sindresorhus/public-ip)\n\n> Get your public IP address - very fast!\n\nIn Node.js, it queries the DNS records of OpenDNS, Google DNS, and HTTPS services to determine your IP address. In browsers, it uses the excellent [icanhaz](https://github.com/major/icanhaz) and [ipify](https://ipify.org) services through HTTPS.\n\n## Install\n\n```\n$ npm install public-ip\n```\n\n## Usage\n\n```js\nconst publicIp = require('public-ip');\n\n(async () => {\n\tconsole.log(await publicIp.v4());\n\t//=> '46.5.21.123'\n\n\tconsole.log(await publicIp.v6());\n\t//=> 'fe80::200:f8ff:fe21:67cf'\n})();\n```\n\n## API\n\n### publicIp.v4(options?)\n### publicIp.v6(options?)\n\nReturns a `Promise<string>` with your public IPv4 or IPv6 address. Rejects on error or timeout. A `.cancel()` method is available on the promise, which can be used to cancel the request.\n\n#### options\n\nType: `object`\n\n##### onlyHttps\n\nType: `boolean`\\\nDefault: `false`\n\nUse a HTTPS check using the [icanhazip.com](https://github.com/major/icanhaz) service instead of the DNS query. [ipify.org](https://www.ipify.org) is used as a fallback if `icanhazip.com` fails. This check is much more secure and tamper-proof, but also a lot slower. **This option is only available in the Node.js version**. The default behaviour is to check aginst DNS before using HTTPS fallback. If set to `true`, it will *only* check against HTTPS.\n\n##### fallbackUrls\n\nType: `string[]`\\\nDefault: `[]`\n\nAdd your own custom HTTPS endpoints to get the public IP from. They will only be used if everything else fails. Any service used as fallback *must* return the IP as a plain string.\n\n```js\nconst publicIp = require('public-ip');\n\n(async () => {\n\tawait publicIp.v6({\n\t\tfallbackUrls: [\n\t\t\t'https://ifconfig.co/ip'\n\t\t]\n\t});\n})();\n```\n\n##### timeout\n\nType: `number`\\\nDefault: `5000`\n\nThe time in milliseconds until a request is considered timed out.\n\n## Maintainers\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [silverwind](https://github.com/silverwind)\n\n## Related\n\n- [public-ip-cli](https://github.com/sindresorhus/public-ip-cli) - CLI for this module\n- [internal-ip](https://github.com/sindresorhus/internal-ip) - Get your internal IP address\n","readmeFilename":"readme.md"}