-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client IP format #8
Comments
This is not at all my strong suit. I was happy having something reasonably readable. If you feel that you can improve this, by all means, please do. |
I propose to introduce some |
https://github.com/whitequark/ipaddr.js/blob/master/test/ipaddr.test.coffee This seems to be a good test suite to write our code against. Let me have a try. |
Where do you want to put such class though? I think there is some overlap between this IP class, |
I am not particularly hurried for the inspection capabilities. My point was rather that we should introduce a specific type before 1.0.0 and then we can add any functionality later, as necessity arises. As for choosing a location: I guess it would be fine to put all of this into tink_url and let tink_tcp depend on it. It's a small and simple lib. Or we could have a tink_ip library, seeing how ipaddr.js demonstrates quite a lot of IP mangling capabilities. But maybe that's just overkill. I'll leave that for you to judge ;) |
I understand that. And I think that IP is different thing than TCP or URL. So I will just make it standalone... |
The clientIp given by NodeContainer is something like
::ffff:127.0.0.1
. I think we need a bit more information about the address than just a plain string, such as the address family IPv4 or IPv6See: https://nodejs.org/api/net.html#net_socket_remotefamily
The text was updated successfully, but these errors were encountered: