Comments (7)
Same problem on Windows...
from node-ip.
Confirm the problem on Windows 10 ...
Not only VM network, but pretty much everything has higher priority than Wifi adapter including VPN
from node-ip.
the same here
from node-ip.
same, running docker and it has a DockerNAT running. ip.address()
and any combination of parameters will return the docker ipv4
from node-ip.
When you are in VPN you are only accessible using VPN internal address, but not a regular network interface address. Correct me if I am not right. So it is a question which behavior is correct.
from node-ip.
No solution in years? Hmm - docker takes priority over Ethernet
from node-ip.
/**
* @param {string} name **Optional** {'public'|'private'},
* Name or security of the network interface like "Docket" | "Wi-Fi",
* if neme set `undefined` return first address of the interface with `ipv4` or loopback address,
* if name set `public` return first public ip address,
* or if name set `private` return first public ip address.
* @param {string} family **Optional** {ipv4|ipv6} IP family of the address (defaults: ipv4).
* @returns {string} Returns the address for the network interface on the current system.
*/
ip.address() // my ip address
ip.address('Wi-Fi') // Obtain Wi-Fi IPV4 address
ip.address('vEthernet (DockerNAT)') // Obtain DocketNAt IPV4 address
ip.address('private') // Obtain private IPV4 address
ip.address('public','ipv6') // Obtain public IPV6 address
from node-ip.
Related Issues (20)
- Inconsistent behavior of `ip.isPrivate`
- `ip.address` returns a different address from `ipconfig` in Windows HOT 2
- cidrSubnet('108.162.192.0/18').contains('::ffff:108.162.245.126') returns false
- Not validating properly (IPV4 with block >= 256 still returns true)
- [BUG] ip.isPrivate mocha test fail
- Should I merge ESM and typescript support?
- Buffer() is deprecated due to security and usability issues
- ip.cidrSubnet('efef::efef::/64').contains('::1') returns true
- ip.address() returns 172.27.0.2 in two different computers. HOT 1
- Audit vulnerabilities detected in the ip project on Tag: v1.1.5 HOT 2
- Error on Node 18 HOT 9
- Unexpected identifier HOT 9
- [BUG] error: var numberOfAddresses = 2 ** (32 - maskLength); SyntaxError: Unexpected token * HOT 3
- Version 2.0.0 is not marked as latest
- Add LICENSE.md
- Private IPv4 mapped regions are only matched in dot-notation
- IPv6 to Int or Long
- V2.0.0 Broke the support for older Node versions
- Ip is giving single strings("1", "2") without dot as valid ipV6address.
- returns localhost (127.0.0.1) as publicIpv4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ip.