-
Notifications
You must be signed in to change notification settings - Fork 3
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 support #5
Comments
|
I would be extremely hesitant to use anything in the
There are three ranges for documentation purposes ( |
What about the CGNAT block (100.64.0.0/10)? |
The CGNAT block is heavily used by mobile carriers around the world. We can't use that range for the same reason we can't use the private ranges: there's a non-zero chance that we could steal an IP used by an ISP's critical network infrastructure. |
That's not actually a problem, though, is it? The Game Boy should never actually be trying to communicate with an ISP's CGNAT addresses. Since the CGNAT addresses are just being used as stand-ins for IPv6 addresses, there won't be any conflicts (and per RFC 6598 "Shared Address Space can be used as additional non-globally routable space on routing equipment that is able to do address translation across router interfaces when the addresses are identical on two different interfaces" which I think more or less applies here). |
The point was to use an address range that would otherwise mean nothing, or be invalid as per the IP spec, since the adapter itself doesn't impose such restrictions. Whether that be the loopback addresses or other addresses assigned to special use, doesn't really matter. The point is mostly that they can't normally be used otherwise. I like the idea of following an old RFC, though. I wonder if there's other RFCs that specify similar v4 to v6 translation mechanisms. |
To my knowledge, the only addresses that are completely unused are the 240.0.0.0/4 block (excluding 255.255.255.255). However, trying to take advantage of something that's currently unused seems like a bad idea considering that there have been repeated proposals to open up 0.0.0.0/8 and 240.0.0.0/4 as new unicast space. On top of this, multiple ISPs use 240.0.0.0/4 internally in violation of its reserved status, so it might not be safe even today. I think 100.64.0.0/10 is the safest option, especially since if you squint it's basically intended for this usecase (doing a form of NAT where the address is an implementation detail to the user). |
IPv6 support is interesting, because eventually the internet will move to that, and there's different ways to make it work. I'm here to propose one:
Games generally don't actually care what IP a server has. They always return exactly the IP that the DNS query command returns. We can use this fact to our advantage. Each time the DNS Query command is called, try fetching both the IPv4 and IPv6 address. Save these in a table, and return a fictional address, that can be later looked up in this table. This table should hold at least as many entries as simultaneous connections can be made. When connecting to one of these, try connecting to both the IPv4 and the IPv6 address, since we don't know exactly what protocols are talked through the user's connection.
To allow games to connect straight to IPv4 addresses, such as addresses in the local network, any address that doesn't start with
0.0.0.xxx
(0.0.0.0/24
in IP talk) will still connect straight to the address.The text was updated successfully, but these errors were encountered: