Index: /trunk/include/iprt/http.h
===================================================================
--- /trunk/include/iprt/http.h	(revision 43678)
+++ /trunk/include/iprt/http.h	(revision 43679)
@@ -73,4 +73,18 @@
 RTR3DECL(int) RTHttpGet(RTHTTP hHttp, const char *pcszUrl, char **ppszResponse);
 
+/**
+ * Specify proxy settings.
+ *
+ * @returns iprt status code.
+ *
+ * @param    hHttp         HTTP interface handle.
+ * @param    pcszProxy     URL of the proxy
+ * @param    uPort         port number of the proxy, use 0 for not specifying a port.
+ * @param    pcszUser      username, pass NULL for no authentication
+ * @param    pcszPwd       password, pass NULL for no authentication
+ */
+RTR3DECL(int) RTHttpSetProxy(RTHTTP hHttp, const char *pcszProxyUrl, uint32_t uPort,
+                             const char *pcszProxyUser, const char *pcszProxyPwd);
+
 /** @} */
 
Index: /trunk/src/VBox/Runtime/common/misc/http.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/http.cpp	(revision 43678)
+++ /trunk/src/VBox/Runtime/common/misc/http.cpp	(revision 43679)
@@ -137,4 +137,36 @@
 }
 
+RTR3DECL(int) RTHttpSetProxy(RTHTTP hHttp, const char *pcszProxy, uint32_t uPort,
+                             const char *pcszProxyUser, const char *pcszProxyPwd)
+{
+    PRTHTTPINTERNAL pHttpInt = hHttp;
+    RTHTTP_VALID_RETURN(pHttpInt);
+    AssertPtrReturn(pcszProxy, VERR_INVALID_PARAMETER);
+
+    int rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXY, pcszProxy);
+    if (CURL_FAILED(rcCurl))
+        return VERR_INVALID_PARAMETER;
+
+    if (uPort != 0)
+    {
+        rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYPORT, (long)uPort);
+        if (CURL_FAILED(rcCurl))
+            return VERR_INVALID_PARAMETER;
+    }
+
+    if (pcszProxyUser && pcszProxyPwd)
+    {
+        rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYUSERNAME, pcszProxyUser);
+        if (CURL_FAILED(rcCurl))
+            return VERR_INVALID_PARAMETER;
+
+        rcCurl = curl_easy_setopt(pHttpInt->pCurl, CURLOPT_PROXYPASSWORD, pcszProxyPwd);
+        if (CURL_FAILED(rcCurl))
+            return VERR_INVALID_PARAMETER;
+    }
+
+    return VINF_SUCCESS;
+}
+
 RTR3DECL(int) RTHttpGet(RTHTTP hHttp, const char *pcszUrl, char **ppszResponse)
 {
