ipv6 client connection fails Error: connect EINVAL
See original GitHub issueI 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
Error: You must specify a full WebSocket URL, including hostname. Relative URLs are not supported.
at WebSocketClient.connect
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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top GitHub Comments
Said that, it’s true that calling
bind()
with a link-local IPv6 with scope Id does work.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.