-
Notifications
You must be signed in to change notification settings - Fork 602
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
ipv6 client connection fails Error: connect EINVAL #278
Comments
WebSocketClient line 132 Wrong result...
{note: the 3rd slash is not there in code, 'cause it's messed up added a path root to href I guess} After poking around in the url.js I noticed the binding to the dreeded cc file here I think the best route is to inject a js _parser override into the url prototype like parseIPV6... and that is why cc is not my modus operandi, it's dysfunctional to me there that way. |
Hi, just to be clear:
So To summarize:
|
Here is the patch/PR that works for me nothing else would. |
My point is that such a workaround should not be done within Node-WebSocket. You should not pass any IPv6 with a
The problem is that it's not a valid IPv6. Nothing else. |
Well it only works that way with the 'Server' it won't bind to it because it's a local range and needs the device name appended with a percent to understand where to route it or something I think? Maybe the specs wrong then? listen requires it if I remove the devicenode with percent from the ip in listen it errors like this... |
Then there is a definitive issue with IPv6 and local ranges. The IPv6 BNF grammar does not allow (AFAIK) the |
BTW, in your #279: Instead of that, you may directly pass a URL object to the |
Here is something... also I mention in the PR something about that but that it seems more fool proof and easier, but it's a good point I should explore that. Basically you could have 2 similar local broadcast blocks on different devices connected to the same machine, and with the zone identifier it can properly route it without it it is a local address block too. Also they all must have one as the spec said above and that's the one they get given by default it's in the fe80 block. It seems weird to me too. |
In RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
So, to be clear, you should NOT include a IPv6 scope ID into a URL. I understand your issue, but it's not something that should be fixed within Node-WebSocket. |
Said that, it's true that calling |
I got the server listening with ipv6 and a percent % with the interface name following For local prefix fe80, but when I go to use Client to connect with wss://[fe80::a00:29?f:fdc2:e0?c]/path
There is no connection with
_Error: connect EINVAL_
If I include the Ethernet device name wss://[fe80::a00:380f:fe2f:67fd%enp0s3]/path
while a browser is good with just
[i::p:v:6]
no devicename and curl wants and likes it with the device name?Seems like somewhere in the Client connect it's improperly understanding proper acceptable ipv6 addresses?!
Note you can also send a %25 to represent the % sign character and again the same with curl it will understand the url encoded percent sign. I've tried these with it including trying to backslash the percent sign, so not too many more options left I can think of? Maybe I need something other then ipv6 local addresses prefixed with fe80? alas that would be pretty hacking. Another hack might involve DNS.
The text was updated successfully, but these errors were encountered: