curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: PHP HTTPS Proxy

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 9 Feb 2017 23:25:14 +0100 (CET)

On Thu, 9 Feb 2017, beshoo wrote:

> curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
> curl_setopt($ch, CURLOPT_PROXY,
> 'https://0f5ee342326fecbfb582ed3dc3495fb10f8ebd56:4F11C6A666BF2B9F922309B29CC486F4CC48CA2900E7B7F8679D69E42786EA21@68.71.55.53:443
> ');

Those two set options are conflicting. Do you want HTTP or HTTPS? If you want
HTTPS, don't set type to HTTP...

> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

That's verification of the remote server, not the proxy. And you're asking for
HTTP server so it won't verify that one anyway.

CURLOPT_PROXY_SSL_VERIFYPEER and CURLOPT_PROXY_SSL_VERIFYHOST. But if your
curl extension for PHP doesn't support the HTTPS type, I figure those options
won't be there for you either. (Until you fix it! =) )

That said, doing HTTPS to a remote proxy and not even verifying it seems like
a bad idea.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-09