Giter Club home page Giter Club logo

Comments (6)

bruce-one avatar bruce-one commented on July 29, 2024

I'd suggest checking out https://github.com/whitequark/ipaddr.js

_.isEqual(ipaddr.process('::ffff:127.0.0.1'), ipaddr.process('127.0.0.1'))

from node-ip.

bryanwayb avatar bryanwayb commented on July 29, 2024

I had the same issue, went ahead an forked the repo, fixed, and waiting on a merge.

You can view the pull request here: #35

from node-ip.

yinrong avatar yinrong commented on July 29, 2024

ip-1.0.1 still have problem with transition ipv4 address

ip.isPrivate("::ffff:127.0.0.1") return false

from node-ip.

bryanwayb avatar bryanwayb commented on July 29, 2024

Hmm, weird, I'd not taken a look at that method before, had just assumed it converted the passed IP address and verified from there.

Seems that method is using regular expressions to do validation, which is fine for IPv4 but IPv6 is a bit more volatile in parsing. Basically it works, but only for each variation that get's manually added.

Try this: npm install https://github.com/bryanwayb/node-ip.git

Also, my PR had been closed, but there's a few reasons to open a new one. Will reference it here once I've done so.

from node-ip.

bryanwayb avatar bryanwayb commented on July 29, 2024

New pull request with the fix is #38

from node-ip.

bryanwayb avatar bryanwayb commented on July 29, 2024

This has since been fixed in version 1.0.2.

from node-ip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.