From: Andrew Dolgov Date: Mon, 30 Sep 2013 09:27:14 +0000 (+0400) Subject: add (undocumented) _CURL_HTTP_PROXY X-Git-Tag: 1.11~53 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=05f14a7d19f217619e7d1220ac98f5788316dd2b;p=tt-rss.git add (undocumented) _CURL_HTTP_PROXY --- diff --git a/include/functions.php b/include/functions.php index 7e08d229..e9b1270f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -379,6 +379,10 @@ curl_setopt($ch, CURLOPT_ENCODING, ""); curl_setopt($ch, CURLOPT_REFERER, $url); + if (defined('_CURL_HTTP_PROXY')) { + curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY); + } + if ($post_query) { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_query); @@ -4216,6 +4220,10 @@ curl_setopt($curl, CURLOPT_TIMEOUT, 60); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + if (defined('_CURL_HTTP_PROXY')) { + curl_setopt($curl, CURLOPT_PROXY, _CURL_HTTP_PROXY); + } + if ((OPENSSL_VERSION_NUMBER >= 0x0090808f) && (OPENSSL_VERSION_NUMBER < 0x10000000)) { curl_setopt($curl, CURLOPT_SSLVERSION, 3); } diff --git a/plugins/af_unburn/init.php b/plugins/af_unburn/init.php index a97502b1..5873ccdf 100644 --- a/plugins/af_unburn/init.php +++ b/plugins/af_unburn/init.php @@ -38,6 +38,10 @@ class Af_Unburn extends Plugin { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("safe_mode") && !ini_get("open_basedir")); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); + if (defined('_CURL_HTTP_PROXY')) { + curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY); + } + $contents = @curl_exec($ch); $real_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);