2 dongfangbubai1 dongfangbubai1 于 2013.11.25 14:37 提问

java.net.SocketException: Malformed reply from SOCKS server
String proxyHost = "10.101.1.6";
    int proxyPort = 80;
    SSLSocketFactory factory = context.getSocketFactory();
    SocketAddress proxyAddr = new InetSocketAddress(proxyHost, proxyPort);
    Socket underlying = new Socket(new Proxy(Proxy.Type.SOCKS, proxyAddr));
    underlying.connect(new InetSocketAddress(host,port));
    SSLSocket socket = (SSLSocket) factory.createSocket(underlying,proxyHost,proxyPort,true);
    socket.setSoTimeout(10000);
运行程序报:java.net.SocketException: Malformed reply from SOCKS server
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!