Заработало.
function request_file_get_contents_gzip_proxy($url, $proxy) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 8);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 8);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_PROXY, $proxy['ip'].':'.$proxy['port']);
if (isset($proxy['user']) && isset($proxy['pass']) && $proxy['user']!='' && $proxy['pass']!='') {
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxy['user'].":".$proxy['pass']);
}
$result = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return ['result' => $result, 'code'=>$httpcode];
}