Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Net module socket.localAddress is changed in node 0.12 #9290

Closed
Doweig opened this issue Feb 26, 2015 · 2 comments
Closed

Net module socket.localAddress is changed in node 0.12 #9290

Doweig opened this issue Feb 26, 2015 · 2 comments

Comments

@Doweig
Copy link

Doweig commented Feb 26, 2015

Hello everyone,

today I'm happy to try to deploy some of my company's apps with node 0.12

I just upgraded from node v0.10.33 to v0.12.0 and noticed this issue with both:

net.createServer(function (socket) { ... });
tls.createServer(function (socket) { ... });

In node 0.10:
console.log(socket.localAddress); // "10.11.1.19"

In node 0.12
console.log(socket.localAddress); // "::ffff:10.11.1.19"

Any idea about what is this "::ffff:" ?

@Doweig
Copy link
Author

Doweig commented Feb 26, 2015

Find some answers here: http://stackoverflow.com/questions/5861107/when-is-the-hybrid-ip-notation-ffff192-168-1-4-appropriate

"It’s IPv4 expressed through IPv6 so that the application only needs to support one IP stack."

However, it's seems like I cannot use this as an IPv4. Any idea on how to convert?
Regexp will work but I find it a bit dirty...

@Doweig
Copy link
Author

Doweig commented Feb 27, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant