Index: /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 37544)
@@ -312,4 +312,5 @@
 	src/settings/global/UIGlobalSettingsNetworkDetails.h \
 	src/settings/global/UIGlobalSettingsExtension.h \
+	src/settings/global/UIGlobalSettingsProxy.h \
 	src/settings/machine/UIMachineSettingsGeneral.h \
 	src/settings/machine/UIMachineSettingsSystem.h \
@@ -479,4 +480,5 @@
 	src/settings/global/UIGlobalSettingsNetworkDetails.cpp \
 	src/settings/global/UIGlobalSettingsExtension.cpp \
+	src/settings/global/UIGlobalSettingsProxy.cpp \
 	src/settings/machine/UIMachineSettingsGeneral.cpp \
 	src/settings/machine/UIMachineSettingsSystem.cpp \
Index: /trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 37544)
@@ -7,5 +7,5 @@
 
 #
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2011 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -36,4 +36,5 @@
     src/settings/global/UIGlobalSettingsNetworkDetails.ui \
     src/settings/global/UIGlobalSettingsExtension.ui \
+    src/settings/global/UIGlobalSettingsProxy.ui \
     src/settings/machine/UIMachineSettingsGeneral.ui \
     src/settings/machine/UIMachineSettingsSystem.ui \
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp	(revision 37544)
@@ -54,4 +54,5 @@
     maxGuestRes = "auto";
     remapScancodes = QString::null;
+    proxySettings = QString::null;
     trayIconEnabled = false;
     presentationModeEnabled = false;
@@ -67,4 +68,5 @@
     maxGuestRes = that.maxGuestRes;
     remapScancodes = that.remapScancodes;
+    proxySettings = that.proxySettings;
     trayIconEnabled = that.trayIconEnabled;
     presentationModeEnabled = that.presentationModeEnabled;
@@ -85,4 +87,5 @@
          maxGuestRes == that.maxGuestRes &&
          remapScancodes == that.remapScancodes &&
+         proxySettings == that.proxySettings &&
          trayIconEnabled == that.trayIconEnabled &&
          presentationModeEnabled == that.presentationModeEnabled &&
@@ -115,4 +118,5 @@
     { "GUI/MaxGuestResolution",                    "maxGuestRes",             "\\d*[1-9]\\d*,\\d*[1-9]\\d*|any|auto", true },
     { "GUI/RemapScancodes",                        "remapScancodes",          "(\\d+=\\d+,)*\\d+=\\d+", true },
+    { "GUI/ProxySettings",                         "proxySettings",           "[\\s\\S]*", true },
     { "GUI/TrayIcon/Enabled",                      "trayIconEnabled",         "true|false", true },
 #ifdef Q_WS_MAC
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h	(revision 37544)
@@ -44,4 +44,5 @@
     QString maxGuestRes;
     QString remapScancodes;
+    QString proxySettings;
     bool trayIconEnabled;
     bool presentationModeEnabled;
@@ -62,4 +63,5 @@
     Q_PROPERTY (QString maxGuestRes READ maxGuestRes WRITE setMaxGuestRes)
     Q_PROPERTY (QString remapScancodes READ remapScancodes WRITE setRemapScancodes)
+    Q_PROPERTY (QString proxySettings READ proxySettings WRITE setProxySettings)
     Q_PROPERTY (bool trayIconEnabled READ trayIconEnabled WRITE setTrayIconEnabled)
     Q_PROPERTY (bool presentationModeEnabled READ presentationModeEnabled WRITE setPresentationModeEnabled)
@@ -114,4 +116,9 @@
     }
 
+    QString proxySettings() const { return data()->proxySettings; }
+    void setProxySettings (const QString &aProxySettings)
+    {
+        mData()->proxySettings = aProxySettings;
+    }
 
     bool trayIconEnabled() const { return data()->trayIconEnabled; }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp	(revision 37544)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2011 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -28,4 +28,5 @@
 #include "VBoxUpdateDlg.h"
 #include "UIIconPool.h"
+#include "VBoxUtils.h"
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
@@ -244,5 +245,5 @@
     , mSelf (aSelf)
     , mUrl ("http://update.virtualbox.org/query.php")
-    , mHttp (new QIHttp (this, mUrl.host()))
+    , mHttp (new QIHttp (this))
     , mForceRun (aForceRun)
 {
@@ -256,4 +257,15 @@
     setWindowIcon(UIIconPool::iconSetFull(QSize (32, 32), QSize (16, 16),
                                           ":/refresh_32px.png", ":/refresh_16px.png"));
+
+    /* Setup HTTP proxy: */
+    UIProxyManager proxyManager(vboxGlobal().settings().proxySettings());
+    if (proxyManager.proxyEnabled())
+    {
+        mHttp->setProxy(proxyManager.proxyHost(), proxyManager.proxyPort().toInt(),
+                        proxyManager.authEnabled() ? proxyManager.authLogin() : QString(),
+                        proxyManager.authEnabled() ? proxyManager.authPassword() : QString());
+    }
+    /* Set HTTP host: */
+    mHttp->setHost(mUrl.host());
 
     /* Setup other connections */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIHttp.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIHttp.h	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIHttp.h	(revision 37544)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2011 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -57,6 +57,6 @@
     };
 
-    QIHttp (QObject *aParent, const QString &aHostName, quint16 aPort = 80)
-        : QHttp (aHostName, aPort, aParent)
+    QIHttp (QObject *aParent)
+        : QHttp (aParent)
         , mStatusCode (0)
         , mErrorCode (NoError)
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h	(revision 37544)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2008 Oracle Corporation
+ * Copyright (C) 2006-2011 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -123,4 +123,75 @@
 };
 
+class UIProxyManager
+{
+public:
+
+    UIProxyManager(const QString &strProxySettings = QString())
+    {
+        /* Parse settings: */
+        if (!strProxySettings.isEmpty())
+        {
+            QStringList proxySettings = strProxySettings.split(",");
+            if (proxySettings.size() > 0)
+                m_fProxyEnabled = proxySettings[0] == "proxyEnabled";
+            if (proxySettings.size() > 1)
+                m_strProxyHost = proxySettings[1];
+            if (proxySettings.size() > 2)
+                m_strProxyPort = proxySettings[2];
+            if (proxySettings.size() > 3)
+                m_fAuthEnabled = proxySettings[3] == "authEnabled";
+            if (proxySettings.size() > 4)
+                m_strAuthLogin = proxySettings[4];
+            if (proxySettings.size() > 5)
+                m_strAuthPassword = proxySettings[5];
+        }
+    }
+
+    QString toString() const
+    {
+        /* Serialize settings: */
+        QString strResult;
+        if (m_fProxyEnabled || !m_strProxyHost.isEmpty() || !m_strProxyPort.isEmpty() ||
+            m_fAuthEnabled || !m_strAuthLogin.isEmpty() || !m_strAuthPassword.isEmpty())
+        {
+            QStringList proxySettings;
+            proxySettings << QString(m_fProxyEnabled ? "proxyEnabled" : "proxyDisabled");
+            proxySettings << m_strProxyHost;
+            proxySettings << m_strProxyPort;
+            proxySettings << QString(m_fAuthEnabled ? "authEnabled" : "authDisabled");
+            proxySettings << m_strAuthLogin;
+            proxySettings << m_strAuthPassword;
+            strResult = proxySettings.join(",");
+        }
+        return strResult;
+    }
+
+    /* Proxy attribute getters: */
+    bool proxyEnabled() const { return m_fProxyEnabled; }
+    const QString& proxyHost() const { return m_strProxyHost; }
+    const QString& proxyPort() const { return m_strProxyPort; }
+    bool authEnabled() const { return m_fAuthEnabled; }
+    const QString& authLogin() const { return m_strAuthLogin; }
+    const QString& authPassword() const { return m_strAuthPassword; }
+
+    /* Proxy attribute setters: */
+    void setProxyEnabled(bool fProxyEnabled) { m_fProxyEnabled = fProxyEnabled; }
+    void setProxyHost(const QString &strProxyHost) { m_strProxyHost = strProxyHost; }
+    void setProxyPort(const QString &strProxyPort) { m_strProxyPort = strProxyPort; }
+    void setAuthEnabled(bool fAuthEnabled) { m_fAuthEnabled = fAuthEnabled; }
+    void setAuthLogin(const QString &strAuthLogin) { m_strAuthLogin = strAuthLogin; }
+    void setAuthPassword(const QString &strAuthPassword) { m_strAuthPassword = strAuthPassword; }
+
+private:
+
+    /* Proxy attribute variables: */
+    bool m_fProxyEnabled;
+    QString m_strProxyHost;
+    QString m_strProxyPort;
+    bool m_fAuthEnabled;
+    QString m_strAuthLogin;
+    QString m_strAuthPassword;
+};
+
 #ifdef Q_WS_MAC
 # include "VBoxUtils-darwin.h"
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp	(revision 37544)
@@ -40,4 +40,5 @@
 #include "UIGlobalSettingsNetwork.h"
 #include "UIGlobalSettingsExtension.h"
+#include "UIGlobalSettingsProxy.h"
 
 #include "UIMachineSettingsGeneral.h"
@@ -385,4 +386,13 @@
                     break;
                 }
+                /* Proxy page: */
+                case GLSettingsPage_Proxy:
+                {
+                    pSettingsPage = new UIGlobalSettingsProxy;
+                    addItem(":/extension_pack_32px.png", ":/extension_pack_disabled_32px.png",
+                            ":/extension_pack_16px.png", ":/extension_pack_disabled_16px.png",
+                            iPageIndex, "#proxy", pSettingsPage);
+                    break;
+                }
                 default:
                     break;
@@ -483,4 +493,7 @@
     /* Extension page: */
     m_pSelector->setItemText(GLSettingsPage_Extension, tr("Extensions"));
+
+    /* Proxy page: */
+    m_pSelector->setItemText(GLSettingsPage_Proxy, tr("Proxy"));
 
     /* Translate the selector: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h	(revision 37544)
@@ -40,4 +40,5 @@
         GLSettingsPage_Network,
         GLSettingsPage_Extension,
+        GLSettingsPage_Proxy,
         GLSettingsPage_MAX
     };
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp	(revision 37544)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp	(revision 37544)
@@ -0,0 +1,147 @@
+/* $Id$ */
+/** @file
+ *
+ * VBox frontends: Qt4 GUI ("VirtualBox"):
+ * UIGlobalSettingsProxy class implementation
+ */
+
+/*
+ * Copyright (C) 2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* Local includes */
+#include "UIGlobalSettingsProxy.h"
+#include "VBoxUtils.h"
+
+/* General page constructor: */
+UIGlobalSettingsProxy::UIGlobalSettingsProxy()
+{
+    /* Apply UI decorations: */
+    Ui::UIGlobalSettingsProxy::setupUi(this);
+
+    /* Setup widgets: */
+    m_pPortEditor->setFixedWidthByText(QString().fill('0', 6));
+    m_pHostEditor->setValidator(new QRegExpValidator(QRegExp("\\S*"), m_pPortEditor));
+    m_pPortEditor->setValidator(new QRegExpValidator(QRegExp("\\d*"), m_pPortEditor));
+    m_pLoginEditor->setValidator(new QRegExpValidator(QRegExp("\\S*"), m_pPortEditor));
+    m_pPasswordEditor->setValidator(new QRegExpValidator(QRegExp("\\S*"), m_pPortEditor));
+
+    /* Setup connections: */
+    connect(m_pProxyCheckbox, SIGNAL(stateChanged(int)), this, SLOT(sltProxyToggled()));
+    connect(m_pAuthCheckbox, SIGNAL(stateChanged(int)), this, SLOT(sltAuthToggled()));
+
+    /* Apply language settings: */
+    retranslateUi();
+}
+
+/* Load data to cashe from corresponding external object(s),
+ * this task COULD be performed in other than GUI thread: */
+void UIGlobalSettingsProxy::loadToCacheFrom(QVariant &data)
+{
+    /* Fetch data to properties & settings: */
+    UISettingsPageGlobal::fetchData(data);
+
+    /* Load to cache: */
+    UIProxyManager proxyManager(m_settings.proxySettings());
+    m_cache.m_fProxyEnabled = proxyManager.proxyEnabled();
+    m_cache.m_strProxyHost = proxyManager.proxyHost();
+    m_cache.m_strProxyPort = proxyManager.proxyPort();
+    m_cache.m_fAuthEnabled = proxyManager.authEnabled();
+    m_cache.m_strAuthLogin = proxyManager.authLogin();
+    m_cache.m_strAuthPassword = proxyManager.authPassword();
+
+    /* Upload properties & settings to data: */
+    UISettingsPageGlobal::uploadData(data);
+}
+
+/* Load data to corresponding widgets from cache,
+ * this task SHOULD be performed in GUI thread only: */
+void UIGlobalSettingsProxy::getFromCache()
+{
+    /* Fetch from cache: */
+    m_pProxyCheckbox->setChecked(m_cache.m_fProxyEnabled);
+    m_pHostEditor->setText(m_cache.m_strProxyHost);
+    m_pPortEditor->setText(m_cache.m_strProxyPort);
+    m_pAuthCheckbox->setChecked(m_cache.m_fAuthEnabled);
+    m_pLoginEditor->setText(m_cache.m_strAuthLogin);
+    m_pPasswordEditor->setText(m_cache.m_strAuthPassword);
+    sltProxyToggled();
+}
+
+/* Save data from corresponding widgets to cache,
+ * this task SHOULD be performed in GUI thread only: */
+void UIGlobalSettingsProxy::putToCache()
+{
+    /* Upload to cache: */
+    m_cache.m_fProxyEnabled = m_pProxyCheckbox->isChecked();
+    m_cache.m_strProxyHost = m_pHostEditor->text();
+    m_cache.m_strProxyPort = m_pPortEditor->text();
+    m_cache.m_fAuthEnabled = m_pAuthCheckbox->isChecked();
+    m_cache.m_strAuthLogin = m_pLoginEditor->text();
+    m_cache.m_strAuthPassword = m_pPasswordEditor->text();
+}
+
+/* Save data from cache to corresponding external object(s),
+ * this task COULD be performed in other than GUI thread: */
+void UIGlobalSettingsProxy::saveFromCacheTo(QVariant &data)
+{
+    /* Fetch data to properties & settings: */
+    UISettingsPageGlobal::fetchData(data);
+
+    UIProxyManager proxyManager;
+    proxyManager.setProxyEnabled(m_cache.m_fProxyEnabled);
+    proxyManager.setProxyHost(m_cache.m_strProxyHost);
+    proxyManager.setProxyPort(m_cache.m_strProxyPort);
+    proxyManager.setAuthEnabled(m_cache.m_fAuthEnabled);
+    proxyManager.setAuthLogin(m_cache.m_strAuthLogin);
+    proxyManager.setAuthPassword(m_cache.m_strAuthPassword);
+    m_settings.setProxySettings(proxyManager.toString());
+
+    /* Upload properties & settings to data: */
+    UISettingsPageGlobal::uploadData(data);
+}
+
+/* Navigation stuff: */
+void UIGlobalSettingsProxy::setOrderAfter(QWidget *pWidget)
+{
+    setTabOrder(pWidget, m_pProxyCheckbox);
+    setTabOrder(m_pProxyCheckbox, m_pHostEditor);
+    setTabOrder(m_pHostEditor, m_pPortEditor);
+    setTabOrder(m_pPortEditor, m_pAuthCheckbox);
+    setTabOrder(m_pAuthCheckbox, m_pLoginEditor);
+    setTabOrder(m_pLoginEditor, m_pPasswordEditor);
+}
+
+/* Translation stuff: */
+void UIGlobalSettingsProxy::retranslateUi()
+{
+    /* Translate uic generated strings: */
+    Ui::UIGlobalSettingsProxy::retranslateUi(this);
+}
+
+void UIGlobalSettingsProxy::sltProxyToggled()
+{
+    m_pHostLabel->setEnabled(m_pProxyCheckbox->isChecked());
+    m_pHostEditor->setEnabled(m_pProxyCheckbox->isChecked());
+    m_pPortLabel->setEnabled(m_pProxyCheckbox->isChecked());
+    m_pPortEditor->setEnabled(m_pProxyCheckbox->isChecked());
+    m_pAuthCheckbox->setEnabled(m_pProxyCheckbox->isChecked());
+    sltAuthToggled();
+}
+
+void UIGlobalSettingsProxy::sltAuthToggled()
+{
+    m_pLoginLabel->setEnabled(m_pProxyCheckbox->isChecked() && m_pAuthCheckbox->isChecked());
+    m_pLoginEditor->setEnabled(m_pProxyCheckbox->isChecked() && m_pAuthCheckbox->isChecked());
+    m_pPasswordLabel->setEnabled(m_pProxyCheckbox->isChecked() && m_pAuthCheckbox->isChecked());
+    m_pPasswordEditor->setEnabled(m_pProxyCheckbox->isChecked() && m_pAuthCheckbox->isChecked());
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h	(revision 37544)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h	(revision 37544)
@@ -0,0 +1,82 @@
+/** @file
+ *
+ * VBox frontends: Qt4 GUI ("VirtualBox"):
+ * UIGlobalSettingsProxy class declaration
+ */
+
+/*
+ * Copyright (C) 2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef __UIGlobalSettingsProxy_h__
+#define __UIGlobalSettingsProxy_h__
+
+/* Local includes */
+#include "UISettingsPage.h"
+#include "UIGlobalSettingsProxy.gen.h"
+
+/* Global settings / Proxy page / Cache: */
+struct UISettingsCacheGlobalProxy
+{
+    UISettingsCacheGlobalProxy() : m_fProxyEnabled(false), m_fAuthEnabled(false) {}
+    bool m_fProxyEnabled;
+    QString m_strProxyHost;
+    QString m_strProxyPort;
+    bool m_fAuthEnabled;
+    QString m_strAuthLogin;
+    QString m_strAuthPassword;
+};
+
+/* Global settings / Proxy page: */
+class UIGlobalSettingsProxy : public UISettingsPageGlobal, public Ui::UIGlobalSettingsProxy
+{
+    Q_OBJECT;
+
+public:
+
+    /* Constructor: */
+    UIGlobalSettingsProxy();
+
+protected:
+
+    /* Load data to cashe from corresponding external object(s),
+     * this task COULD be performed in other than GUI thread: */
+    void loadToCacheFrom(QVariant &data);
+    /* Load data to corresponding widgets from cache,
+     * this task SHOULD be performed in GUI thread only: */
+    void getFromCache();
+
+    /* Save data from corresponding widgets to cache,
+     * this task SHOULD be performed in GUI thread only: */
+    void putToCache();
+    /* Save data from cache to corresponding external object(s),
+     * this task COULD be performed in other than GUI thread: */
+    void saveFromCacheTo(QVariant &data);
+
+    /* Navigation stuff: */
+    void setOrderAfter(QWidget *pWidget);
+
+    /* Translation stuff: */
+    void retranslateUi();
+
+private slots:
+
+    void sltProxyToggled();
+    void sltAuthToggled();
+
+private:
+
+    /* Cache: */
+    UISettingsCacheGlobalProxy m_cache;
+};
+
+#endif // __UIGlobalSettingsProxy_h__
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui	(revision 37544)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui	(revision 37544)
@@ -0,0 +1,214 @@
+<ui version="4.0">
+ <comment>
+ VBox frontends: Qt4 GUI ("VirtualBox"):
+
+     Copyright (C) 2011 Oracle Corporation
+
+     This file is part of VirtualBox Open Source Edition (OSE), as
+     available from http://www.virtualbox.org. This file is free software;
+     you can redistribute it and/or modify it under the terms of the GNU
+     General Public License (GPL) as published by the Free Software
+     Foundation, in version 2 as it comes in the "COPYING" file of the
+     VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+     hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ </comment>
+ <class>UIGlobalSettingsProxy</class>
+ <widget class="QWidget" name="UIGlobalSettingsProxy">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>300</width>
+    <height>150</height>
+   </rect>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint">
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="1" colspan="4">
+    <widget class="QCheckBox" name="m_pProxyCheckbox">
+     <property name="whatsThis">
+      <string>When checked, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</string>
+     </property>
+     <property name="text">
+      <string>&amp;Enable proxy</string>
+     </property>
+     <property name="checked">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint">
+      <size>
+       <width>16</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="2" colspan="3">
+    <layout class="QHBoxLayout">
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="m_pHostLabel">
+       <property name="text">
+        <string>Ho&amp;st:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+       <property name="buddy">
+        <cstring>m_pHostEditor</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QILineEdit" name="m_pHostEditor">
+       <property name="whatsThis">
+        <string>Changes the proxy host.</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="m_pPortLabel">
+       <property name="text">
+        <string>&amp;Port:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+       <property name="buddy">
+        <cstring>m_pPortEditor</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QILineEdit" name="m_pPortEditor">
+       <property name="whatsThis">
+        <string>Changes the proxy port.</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="2" colspan="3">
+    <widget class="QCheckBox" name="m_pAuthCheckbox">
+     <property name="whatsThis">
+      <string>When checked the authentication supplied will be used with the proxy server.</string>
+     </property>
+     <property name="text">
+      <string>&amp;Use authentication</string>
+     </property>
+     <property name="checked">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2" rowspan="2">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint">
+      <size>
+       <width>16</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="3">
+    <widget class="QLabel" name="m_pLoginLabel">
+     <property name="text">
+      <string>User &amp;name:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+     </property>
+     <property name="buddy">
+      <cstring>m_pLoginEditor</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="4">
+    <widget class="QILineEdit" name="m_pLoginEditor">
+     <property name="whatsThis">
+      <string>Changes the user name used for authentication.</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="3">
+    <widget class="QLabel" name="m_pPasswordLabel">
+     <property name="text">
+      <string>Pass&amp;word:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+     </property>
+     <property name="buddy">
+      <cstring>m_pPasswordEditor</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="4">
+    <widget class="QILineEdit" name="m_pPasswordEditor">
+     <property name="whatsThis">
+      <string>Changes the password used for authentication.</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1" colspan="4">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>QILineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>QILineEdit.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIDownloader.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIDownloader.cpp	(revision 37543)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIDownloader.cpp	(revision 37544)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2011 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -24,4 +24,5 @@
 #include "VBoxProblemReporter.h"
 #include "UISpecialControls.h"
+#include "VBoxUtils.h"
 
 /* Global includes */
@@ -150,10 +151,23 @@
 void UIDownloader::acknowledgeStart()
 {
+    /* Recreate HTTP: */
     delete m_pHttp;
-    m_pHttp = new QIHttp(this, m_source.host());
+    m_pHttp = new QIHttp(this);
+    /* Setup HTTP proxy: */
+    UIProxyManager proxyManager(vboxGlobal().settings().proxySettings());
+    if (proxyManager.proxyEnabled())
+    {
+        m_pHttp->setProxy(proxyManager.proxyHost(), proxyManager.proxyPort().toInt(),
+                          proxyManager.authEnabled() ? proxyManager.authLogin() : QString(),
+                          proxyManager.authEnabled() ? proxyManager.authPassword() : QString());
+    }
+    /* Set HTTP host: */
+    m_pHttp->setHost(m_source.host());
+    /* Setup connections: */
     connect(m_pHttp, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),
             this, SLOT(acknowledgeProcess(const QHttpResponseHeader &)));
     connect(m_pHttp, SIGNAL(allIsDone(bool)),
             this, SLOT(acknowledgeFinished(bool)));
+    /* Make a request: */
     m_pHttp->get(m_source.toEncoded());
 }
@@ -206,10 +220,23 @@
 void UIDownloader::downloadStart()
 {
+    /* Recreate HTTP: */
     delete m_pHttp;
-    m_pHttp = new QIHttp(this, m_source.host());
+    m_pHttp = new QIHttp(this);
+    /* Setup HTTP proxy: */
+    UIProxyManager proxyManager(vboxGlobal().settings().proxySettings());
+    if (proxyManager.proxyEnabled())
+    {
+        m_pHttp->setProxy(proxyManager.proxyHost(), proxyManager.proxyPort().toInt(),
+                          proxyManager.authEnabled() ? proxyManager.authLogin() : QString(),
+                          proxyManager.authEnabled() ? proxyManager.authPassword() : QString());
+    }
+    /* Set HTTP host: */
+    m_pHttp->setHost(m_source.host());
+    /* Setup connections: */
     connect(m_pHttp, SIGNAL(dataReadProgress (int, int)),
             this, SLOT (downloadProcess(int, int)));
     connect(m_pHttp, SIGNAL(allIsDone(bool)),
             this, SLOT(downloadFinished(bool)));
+    /* Make a request: */
     m_pHttp->get(m_source.toEncoded());
 }
