My environment is
PHP@7.2MacBook Pro with M1 chipMacOS 12.0.1Root cert is already trusted.
and then run my code on local machine (not in container) by php artisan tinker
These are my sample code:
$ch = curl_init(); curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8866');curl_setopt ( $ch, CURLOPT_URL, "https://www.google.com/" );
Fiddler only shows a close connection as the following image, and curl_exec will return false.
But when I just remove CURLOPT_PROXY option, it back to normal.
curl_exec will return HTML of https://www.google.com.
Sorry for my formatting.
my environment is
I've posted the suggestions below in our email thread, but for transparency and for added visibility to the community I am also reposting those here:
The above probably corresponds to CURLOPT_SSL_VERIFYPEER https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html and CURLOPT_SSL_VERIFYHOST https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html
curl --url https://www.example.com/ -x 127.0.0.1:8866 --ssl-no-revoke -v
--cacert <file> (TLS) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option is typically used to alter that default file...