IPV6 #260

Closed
3rd-Eden opened this Issue Jul 29, 2011 · 4 comments

Comments

Projects
None yet
6 participants
@3rd-Eden
Contributor

3rd-Eden commented Jul 29, 2011

Might be a bit early to request this, but it's better than to forget about it.

The util.parseUri is unable to parse the url if it contains a ipv6 as host.

io.connect('2001:db8::1:0:0:1/namespace')

fails because of it.

@liuyanghejerry

This comment has been minimized.

Show comment Hide comment
@liuyanghejerry

liuyanghejerry Dec 22, 2011

Failed in my case, either. Maybe it's time to move on.

Failed in my case, either. Maybe it's time to move on.

@theopolis

This comment has been minimized.

Show comment Hide comment
@theopolis

theopolis Apr 10, 2012

IPv6 addresses "[ffff::1]" fail in parseUri due to the regular expression.

var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/

I have not exhaustively tested this, but this should work given a square brace encompassed IPv6 address:

var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?(\[[^\/?#]*\]|[^\[][^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/

IPv6 addresses "[ffff::1]" fail in parseUri due to the regular expression.

var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/

I have not exhaustively tested this, but this should work given a square brace encompassed IPv6 address:

var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?(\[[^\/?#]*\]|[^\[][^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/

@yandaoyong

This comment has been minimized.

Show comment Hide comment
@yandaoyong

yandaoyong Aug 13, 2012

socket.io not support IPv6 bug

here is my code

var io = require('socket.io').listen(8080);

###########################################
when I am at IPv4 environment,I can visit http://mydomain.com:8080/socket.io/socket.io.js

when I am at IPv6 environment,I can not visit http://mydomain.com:8080/socket.io/socket.io.js

ps:http://mydomain.com has A and AAAA IP Analytic

socket.io not support IPv6 bug

here is my code

var io = require('socket.io').listen(8080);

###########################################
when I am at IPv4 environment,I can visit http://mydomain.com:8080/socket.io/socket.io.js

when I am at IPv6 environment,I can not visit http://mydomain.com:8080/socket.io/socket.io.js

ps:http://mydomain.com has A and AAAA IP Analytic

@itsatony itsatony referenced this issue in socketio/engine.io-client Dec 6, 2012

Closed

IPV6 #75

@mgguenni

This comment has been minimized.

Show comment Hide comment
@mgguenni

mgguenni Sep 9, 2014

ich komme nicht mehr ins spiel zeigt an ip ist in anwendung ich bin aber nicht angemeldet

mgguenni commented Sep 9, 2014

ich komme nicht mehr ins spiel zeigt an ip ist in anwendung ich bin aber nicht angemeldet

@sweetpi sweetpi referenced this issue in pimatic/pimatic Oct 26, 2014

Closed

pimatic in combination with ipv6 #333

@rauchg rauchg closed this Nov 25, 2014

lattmann pushed a commit to lattmann/socket.io-client that referenced this issue Jul 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment