ProxyRequest req = null;
if (args.length == 4) {
if ("SOCKS4".equals(args[3])) {
req = new SocksProxyRequest(
SocksProxyConstants.SOCKS_VERSION_4,
SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
new InetSocketAddress(url.getHost(), port), USER);
} else if ("SOCKS4a".equals(args[3])) {
req = new SocksProxyRequest(
SocksProxyConstants.ESTABLISH_TCPIP_STREAM, url
.getHost(), port, USER);
} else if ("SOCKS5".equals(args[3])) {
req = new SocksProxyRequest(
SocksProxyConstants.SOCKS_VERSION_5,
SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
new InetSocketAddress(url.getHost(), port), USER);
((SocksProxyRequest) req).setPassword(PWD);
((SocksProxyRequest) req)