极光推送 代理服务器

www123
2017-12-26 05:35 1.7k 0

使用HttpProxy做代理 , 出现这个错误.

Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
    at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:1874)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1092)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:161)
    ... 126 more

备注 : 创建JPushClient客户端的方式这样子吗 ?

HttpProxy httpProxyUrl = new HttpProxy("代理服务器", 端口号);
jPushClient = new JPushClient(masterSecret, appKey, 3, httpProxyUrl);

1个回答

热门排序
  • KenChoi
    2017-12-26 06:02

    你代理服务器有没有测试可以响应请求?