{"id":15663945,"url":"https://github.com/aldaviva/local-ipv4-address","last_synced_at":"2025-10-15T05:34:18.406Z","repository":{"id":70211710,"uuid":"87625300","full_name":"Aldaviva/local-ipv4-address","owner":"Aldaviva","description":"🌐 Get the LAN IPv4 address of the local machine based on the default gateway.","archived":false,"fork":false,"pushed_at":"2017-04-22T09:29:21.000Z","size":9,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T21:50:52.437Z","etag":null,"topics":["ip-address","ipaddresses","lan","localhost","network-interfaces"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/local-ipv4-address","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aldaviva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://paypal.me/aldaviva"]}},"created_at":"2017-04-08T10:14:45.000Z","updated_at":"2024-12-04T14:53:34.000Z","dependencies_parsed_at":"2023-05-04T00:49:10.986Z","dependency_job_id":null,"html_url":"https://github.com/Aldaviva/local-ipv4-address","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"b82e308568a4fc5f3b362adf08f07daddc26c931"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Aldaviva/local-ipv4-address","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Flocal-ipv4-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Flocal-ipv4-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Flocal-ipv4-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Flocal-ipv4-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aldaviva","download_url":"https://codeload.github.com/Aldaviva/local-ipv4-address/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Flocal-ipv4-address/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266041824,"owners_count":23867952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ip-address","ipaddresses","lan","localhost","network-interfaces"],"created_at":"2024-10-03T13:40:36.931Z","updated_at":"2025-10-15T05:34:13.373Z","avatar_url":"https://github.com/Aldaviva.png","language":"JavaScript","funding_links":["https://paypal.me/aldaviva"],"categories":[],"sub_categories":[],"readme":"local-ipv4-address\n===\n\nGet the local network IPv4 address of the current computer based on the default gateway.\n\nAll of the other Node.js modules I found picked the address of the first or a random external interface from `os.networkInterfaces()` or performed a DNS lookup on the hostname. What if I have VMware virtual interfaces, an OpenVPN connection, wifi, an ethernet cable, and some loopback interfaces with convincing-looking hosts entries all connected?\n\nUnder the hood, it just executes `route.exe` or `netstat` and parses the output with regular expressions.\n\n## Installation\n\n```bash\n$ npm install --save local-ipv4-address\n```\n\n## Usage\n\n### In a Node module\n\n```javascript\nvar localIpV4Address = require(\"local-ipv4-address\");\n\nlocalIpV4Address().then(function(ipAddress){\n    console.log(\"My IP address is \" + ipAddress);\n    // My IP address is 10.4.4.137\n});\n```\n\n### On the command line\n\n```bash\n$ node node_modules/local-ipv4-address\n10.4.4.137\n```\n\n## Platform support\n\n|Operating System|Versions tested|\n|---|---|\n|FreeBSD|11.0|\n|Linux|Debian 8.7 Jessie|\n|Mac OS|10.12.4 Sierra|\n|Windows|7, Server 2016|\n\n\n## What's not handled\n- WAN address\n- IPv6\n- Multiple gateways\n- Multi-homed connections\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldaviva%2Flocal-ipv4-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldaviva%2Flocal-ipv4-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldaviva%2Flocal-ipv4-address/lists"}