The test client (HtmlUnit installed, IPv4 only) ssh -D to the socks server via IPv4. and socks server is IPv6 enabled, so it's able to connect test website via IPv6. Due to some resource restrictions, I can't make test client IPv6 enabled, so I have to use socks proxy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How do you configure it with Firefox?
What about wrapping the WebConnection and resolving the IP addresses yourself there?
In FF, "about:config"
network.proxy.socks_remote_dns
The test client (HtmlUnit installed, IPv4 only) ssh -D to the socks server via IPv4. and socks server is IPv6 enabled, so it's able to connect test website via IPv6. Due to some resource restrictions, I can't make test client IPv6 enabled, so I have to use socks proxy.
sorry but it looks like there is no java support for this (https://bugs.openjdk.java.net/browse/JDK-8028776)