diff --git a/lib/util.php b/lib/util.php
index 4170de2125a172da68a85238f37379501f0ad9db..98f0d053e32584772359cb5d0ff660f35a2cbb56 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -688,14 +688,27 @@ class OC_Util {
                 curl_close($curl);
 
             } else {
-                
-                $ctx = stream_context_create(
-                    array(
-                        'http' => array(
-                            'timeout' => 10
-                        )
-                    )
-                );
+	        $contextArray = null;
+	            
+	        if(OC_Config::getValue('proxy','')<>'') {
+	                $contextArray = array(
+	                                    'http' => array(
+	                                        'timeout' => 10,
+	                                        'proxy' => OC_Config::getValue('proxy')
+	                                    )
+	                             );
+	        } else {
+	                $contextArray = array(
+	                                    'http' => array(
+		                                'timeout' => 10
+	                                  )
+	                             );
+	        }
+	            
+	            
+	        $ctx = stream_context_create(
+	            $contextArray
+	        );
                 $data=@file_get_contents($url, 0, $ctx);
                 
             }