yyb

Results 10 comments of yyb

I find the same problem now ,okhttp Proxy.Type.HTTP don't support https request ,http request is fine. is any solution for this problem?

anybody can help me ?okhttp https httpProxy

okhttp Proxy.Type.HTTP don't support https request ? follow is my code,https request don't work sslSocketFactory = HttpsUtils.setCertificates(new Buffer().writeUtf8(HttpsCert.NEW_CER_IBU).inputStream()); OkHttpClient okHttpClient = new OkHttpClient.Builder() .connectTimeout(10000L, TimeUnit.MILLISECONDS) .readTimeout(10000L, TimeUnit.MILLISECONDS) .addInterceptor(new LoggerInterceptor("TAG", BuildConfig.BUILD_TYPE.equals("debug")))...

@mgaido91 how to call the method in your sample?

when I set cer ,call which method?

@mgaido91 yes this is my problem

I am android develper,and I don't konw how to set socketFactory to a SSLSocketFactory in your suggestion

@mgaido91 I am a chinese ,thank you for your help!!!

@mgaido91 ,my problem is what you say.but as you say,if I want to support HTTPS proxy, use ProxyType.HTTP and set the socketFactory to a SSLSocketFactory , how I make a...

@mgaido91 do I need to call okhttpClient.builder..proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("host", port)))?