Skip to content
Snippets Groups Projects
Commit b6b4c4c9 authored by Frank Karlitschek's avatar Frank Karlitschek
Browse files

add curl proxy support. Fixes #504

parent f0893fb8
Branches
No related tags found
No related merge requests found
......@@ -42,6 +42,12 @@ $CONFIG = array(
/* Time in seconds how long an user is authenticated without entering his password again before performing sensitive actions like creating or deleting users etc...*/
"enhancedauthtime" => 15 * 60,
/* A proxy to use to connect to the internet. For example "myproxy.org:88" */
"curlproxy" => "",
/* The optional authentication for the proxy to use to connect to the internet. The format is: [username]:[password] */
"curlproxyuserpwd" => "",
/* Theme to use for ownCloud */
"theme" => "",
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment