curl -x IP:PORT -k 'https://SITE'
结果: curl: (56) Proxy CONNECT aborted
$ip = "IP:PORT";
$url = "https://SITE";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_PROXY, $ip);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
var_dump($output);
结果:boolean(false)
RT,这个问题让我好头疼,网站没搜到资料,求问有什么方式可以实现我的需求吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
参考 so 上这两篇文章提供的方法
curl-https-through-a-proxy
linux-curl-command-with-proxy
装个proxychains,如果是见不得光的,可以用ss+arm-tor
试试 --resolve '域名:目标端口:目标IP' 部分curl命令有这个参数
http://serverfault.com/questi...