Last 12 weeks · 0 commits
4 of 6 standards met
The module currently assumes that the default gateway lies within one of the configured interface subnets but there are cases where this assumption does not hold true. One example is a Travis VM having with gateway . Strictly speaking, this is a invalid network configuration but it somehow still works so we need to account for it. One approach could be to find the address nearest to the gateway. It's a guess but chances are it might be correct. To get the nearest IPv6 adress conveniently, we need to convert both the address CIDR and gateway address to a BigInt and then compare them, so I would like to require native BigInt (node 10.4.0+).
Repository: sindresorhus/internal-ip. Description: Get your internal IP address Stars: 350, Forks: 26. Primary language: JavaScript. Languages: JavaScript (97.5%), TypeScript (2.5%). License: MIT. Latest release: v9.0.0 (6mo ago). Open PRs: 0, open issues: 0. Last activity: 6mo ago. Community health: 85%. Top contributors: sindresorhus, silverwind, Richienb, shellscape, arthurvr, ChrisCindy, BendingBender, Marsup, Rodrigo54, SamVerschueren.