]> git.wh0rd.org - tt-rss.git/commitdiff
add (undocumented) _CURL_HTTP_PROXY
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 30 Sep 2013 09:27:14 +0000 (13:27 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 30 Sep 2013 09:27:14 +0000 (13:27 +0400)
include/functions.php
plugins/af_unburn/init.php

index 7e08d22965af8ff3dcff13c4a3e12f216f188f40..e9b1270fb6eff60a994170bb919982b6da168493 100644 (file)
                        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);
                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);
                }
index a97502b12a7ebfd988916722ddc71f7f63496c6f..5873ccdf75a5bcac6ed3698c66e652a174de9cf0 100644 (file)
@@ -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);