summaryrefslogtreecommitdiffstats
path: root/lib/util.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-12-14 18:52:16 +0100
committerFrank Karlitschek <frank@owncloud.org>2012-12-14 18:52:16 +0100
commitb6b4c4c9201af1539c07f611f3e24ec0de5e0667 (patch)
tree352b2878c5f2e7948d46e179a11282e55be52e2e /lib/util.php
parentf0893fb8fe7f0642ae30de2e1168472377c127e2 (diff)
downloadnextcloud-server-b6b4c4c9201af1539c07f611f3e24ec0de5e0667.tar.gz
nextcloud-server-b6b4c4c9201af1539c07f611f3e24ec0de5e0667.zip
add curl proxy support. Fixes #504
https://github.com/owncloud/core/issues/504
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 34c4d4f9b11..370e5dc13fc 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -696,6 +696,8 @@ class OC_Util {
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
+ if(OC_Config::getValue('curlproxy','')=='') curl_setopt($curl, CURLOPT_PROXY, OC_Config::getValue('curlproxy'));
+ if(OC_Config::getValue('curlproxyuserpwd','')=='') curl_setopt($curl, CURLOPT_PROXYUSERPWD, OC_Config::getValue('curlproxyuserpwd'));
$data = curl_exec($curl);
curl_close($curl);