参考
in ODC, there is a proxy server. It can tell us UrlConnection is different from Socket.
This proxy server, only open http, but block socket5
So you set System.setProperty("java.net.useSystemProxies", "true");, then use UrlConnection. It OK
But httpclient failed. It use socket. Exception in thread "main" java.net.SocketException: Malformed reply from SOCKS server
For connections where you specify the a protocol, such as HTTP, use URL. This handles the Socket stuff for you because it has to provide the protocol. For connections where you want to work directly with a socket, you have to specify host and port, etc. but you have to provide your own protocol handling.