You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugsomething isn't working in the intended waynetworkIssues with the protocolui/uxundecideda final decision has not been made whether or how this enhancement should be implemented
Actually it doesn't seem like a good idea to switch to IPv6.
Support for IPv6 is still relatively poor, for example my internet provider does not appear support it natively, it only supports it via 6to4 tunneling. And there are still many devices that do not support IPv6 at all.
Supporting IPv6 alongside IPv4 is also not an option, since it would make the user interface even more confusing than it already is.
Hi, the current errors when entering an ipv6 address or ipv6-only domain (my setup is near-exclusively ipv6 nowadays, except for my websites) are quite cryptic. It would be nice if this could be improved, perhaps with a link to this issue.
Of course, supporting ipv6 would also indeed be extremely good™ and very appreciated. The user interface for joining wouldnt really need to be more complicated either, it is standard practice to put ipv6 addresses in square brackets in address fields, without any need for a toggle or whatever. For now, we can leave ipv6 out of the address display, i guess, due to the possible confusion.
And there are still many devices that do not support IPv6 at all.
this is not true, all devices manufactured in the last 20 years will do just fine with an ipv6 connection (even an ipv6-only connection), and any OS updated in the last 20 years will do so too (even windows 7 has IPv6 enabled by default). the only bottleneck are ISPs that think theyre too fancy to deploy it (and a few routers that have it disabled by default for some reason), of which there are fewer and fewer. see https://www.google.com/ipv6/statistics.html#tab=ipv6-adoption for stats on that, and these are a pretty pessimistic estimate that doesnt quite match my experience - most people i talk to have ipv6.
here is a thinkpad from 2005 with 32-bit windows 7 passing an ipv6 test with 10/10 points:
Since I don't know how to detect carrier grade NATs, I'd need to use IPv6 for everything which reduces the bandwidth (IPv6 headers are bigger).
you can also default to ipv6 and switch to ipv4 if that doesnt work, or the other way around. one way to accomplish this is outputting both ipv6 and ipv4 in a single base32 value, which the other side can enter. cubyz can then find whatever works. symmetric NAT / NAT4 (what CGNAT often is - this is the actual issue with it, not that its carrier grade) can also be detected by having two STUN servers, and checking whether using the same egress port on the client will result in the same egress port being shown in both STUN results (if not, NAT is symmetric and thus ipv4 traversal impossible).
less than 50% supported devices seems pretty bad, even if we assume that it's using a pessimistic metric.
And I think when I posted this issue there was also at least one person in the community for whom it didn't work.
For now, we can leave ipv6 out of the address display, i guess, due to the possible confusion.
So what do you propose then? Two separate sockets on the server? Seems like it would be rather annoying to implement and maintain (and thanks to Windows, the network code needs a lot of maintainance).
symmetric NAT / NAT4 (what CGNAT often is - this is the actual issue with it, not that its carrier grade) can also be detected by having two STUN servers
We already do that, the reason for creating this issue was that there was a cgnat (somewhere in the UK) where it didn't detect symmetric NAT but connecting was still not possible. I couldn't find a reason for it and I just blindly hoped that IPv6 could fix it.
this statistic is the number of devices that Actively Prefer ipv6 over ipv4 for requests. this is part of why i consider the stat so pessimistic.
We already do that
nice
I couldn't find a reason for it and I just blindly hoped that IPv6 could fix it.
well, it can, if both sides have it.
So what do you propose then? Two separate sockets on the server?
a socket listening on [::0]:47649 will automatically also receive ipv4 connections, at least to my knowledge. as a result, thats what i usually use. im not sure if you consider this adequate of course, as you expressed concern over MTU, which is 24 bytes less in udp6 than in udp4 as far as i can tell
So what do you propose then? Two separate sockets on the server? Seems like it would be rather annoying to implement and maintain (and thanks to Windows, the network code needs a lot of maintainance).
If i remember correctly you could connect to an IPv6 server with an IPv4 client,
Looking at one of my old (c++) projects, i got this line, that might help you:
int no = 0;
setsockopt(handle,IPPROTO_IPV6,IPV6_V6ONLY,(constchar*)&no,sizeof(no));
(same code for windows and for linux)
I tested it with an IPv4 client: netcat 127.0.0.1 <port> , connecting to my IPv6 server and the server interpreted the client's ipv4 as ::ffff:127.0.0.1 , but haven't tested it with two different machines yet (i.e. not localhost).
bugsomething isn't working in the intended waynetworkIssues with the protocolui/uxundecideda final decision has not been made whether or how this enhancement should be implemented
Activity
IntegratedQuantum commentedon Dec 29, 2024
Actually it doesn't seem like a good idea to switch to IPv6.
Support for IPv6 is still relatively poor, for example my internet provider does not appear support it natively, it only supports it via 6to4 tunneling. And there are still many devices that do not support IPv6 at all.
Supporting IPv6 alongside IPv4 is also not an option, since it would make the user interface even more confusing than it already is.
TudbuT commentedon Jan 5, 2026
Hi, the current errors when entering an ipv6 address or ipv6-only domain (my setup is near-exclusively ipv6 nowadays, except for my websites) are quite cryptic. It would be nice if this could be improved, perhaps with a link to this issue.
Of course, supporting ipv6 would also indeed be extremely good™ and very appreciated. The user interface for joining wouldnt really need to be more complicated either, it is standard practice to put ipv6 addresses in square brackets in address fields, without any need for a toggle or whatever. For now, we can leave ipv6 out of the address display, i guess, due to the possible confusion.
this is not true, all devices manufactured in the last 20 years will do just fine with an ipv6 connection (even an ipv6-only connection), and any OS updated in the last 20 years will do so too (even windows 7 has IPv6 enabled by default). the only bottleneck are ISPs that think theyre too fancy to deploy it (and a few routers that have it disabled by default for some reason), of which there are fewer and fewer. see https://www.google.com/ipv6/statistics.html#tab=ipv6-adoption for stats on that, and these are a pretty pessimistic estimate that doesnt quite match my experience - most people i talk to have ipv6.
here is a thinkpad from 2005 with 32-bit windows 7 passing an ipv6 test with 10/10 points:
you can also default to ipv6 and switch to ipv4 if that doesnt work, or the other way around. one way to accomplish this is outputting both ipv6 and ipv4 in a single base32 value, which the other side can enter. cubyz can then find whatever works. symmetric NAT / NAT4 (what CGNAT often is - this is the actual issue with it, not that its carrier grade) can also be detected by having two STUN servers, and checking whether using the same egress port on the client will result in the same egress port being shown in both STUN results (if not, NAT is symmetric and thus ipv4 traversal impossible).
IntegratedQuantum commentedon Jan 5, 2026
less than 50% supported devices seems pretty bad, even if we assume that it's using a pessimistic metric.
And I think when I posted this issue there was also at least one person in the community for whom it didn't work.
So what do you propose then? Two separate sockets on the server? Seems like it would be rather annoying to implement and maintain (and thanks to Windows, the network code needs a lot of maintainance).
We already do that, the reason for creating this issue was that there was a cgnat (somewhere in the UK) where it didn't detect symmetric NAT but connecting was still not possible. I couldn't find a reason for it and I just blindly hoped that IPv6 could fix it.
TudbuT commentedon Jan 6, 2026
this statistic is the number of devices that Actively Prefer ipv6 over ipv4 for requests. this is part of why i consider the stat so pessimistic.
nice
well, it can, if both sides have it.
a socket listening on [::0]:47649 will automatically also receive ipv4 connections, at least to my knowledge. as a result, thats what i usually use. im not sure if you consider this adequate of course, as you expressed concern over MTU, which is 24 bytes less in udp6 than in udp4 as far as i can tell
tillpp commentedon Jan 6, 2026
If i remember correctly you could connect to an IPv6 server with an IPv4 client,
Looking at one of my old (c++) projects, i got this line, that might help you:
(same code for windows and for linux)
I tested it with an IPv4 client:
netcat 127.0.0.1 <port>, connecting to my IPv6 server and the server interpreted the client's ipv4 as::ffff:127.0.0.1, but haven't tested it with two different machines yet (i.e. not localhost).TudbuT commentedon Jan 6, 2026
correct. ipv6 sockets can handle incoming v4 always - all my networking apps listen on v6 only
use `std.Io.net.IpAddress` instead of making our own (#3056)