These addresses follow the pattern "::ffff:192.168.0.1" where the 11th and 12th bytes are set all 0xFF and the 13th through 16th bytes represent the IPv4 address.
Currently in Java, the InetAddress.getAddress() function will automatically convert these to Inet4Addresses. This can cause issues with things such as the encoders which should be able to handle a valid the correct encodings for any IPv6.
There is a workaround for generating Inet6Addresses in Java however using the Inet6Address.getAddress() functions which allow for a way to make this functionality work. The downside to this is that handling of IPv6(Inet6Address) addresses needs to be consistently across the codebase.
These addresses follow the pattern "::ffff:192.168.0.1" where the 11th and 12th bytes are set all 0xFF and the 13th through 16th bytes represent the IPv4 address.
Currently in Java, the InetAddress.getAddress() function will automatically convert these to Inet4Addresses. This can cause issues with things such as the encoders which should be able to handle a valid the correct encodings for any IPv6.
There is a workaround for generating Inet6Addresses in Java however using the Inet6Address.getAddress() functions which allow for a way to make this functionality work. The downside to this is that handling of IPv6(Inet6Address) addresses needs to be consistently across the codebase.