diff -uNr libzypp-6.30.4/zypp/media/MediaCurl.cc libzypp-6.30.4.new/zypp/media/MediaCurl.cc
--- libzypp-6.30.4/zypp/media/MediaCurl.cc	2010-03-30 10:05:18.000000000 +0800
+++ libzypp-6.30.4.new/zypp/media/MediaCurl.cc	2010-04-06 14:21:08.000000000 +0800
@@ -11,7 +11,10 @@
 */
 
 #include <iostream>
+#include <fstream>
 #include <list>
+#include <gconf/gconf-value.h>
+#include <gconf/gconf-client.h>
 
 #include "zypp/base/Logger.h"
 #include "zypp/ExternalProgram.h"
@@ -30,7 +33,10 @@
 #include "zypp/Target.h"
 #include "zypp/ZYppFactory.h"
 
+#include <cstdio>
 #include <cstdlib>
+#include <cstring>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
@@ -45,6 +51,22 @@
 #define  TRANSFER_TIMEOUT_MAX   60 * 60
 
 
+#define withClient(c) for(GConfClient *c = (g_type_init(), gconf_client_get_default()); c; g_object_unref(c), c=NULL)
+
+#define GCONF_PROXY_HTTP  "/system/http_proxy/host"
+#define GCONF_PROXY_HTTP_PORT  "/system/http_proxy/port"
+
+#define GCONF_PROXY_FTP   "/system/proxy/ftp_host"
+#define GCONF_PROXY_FTP_PORT   "/system/proxy/ftp_port"
+
+#define GCONF_PROXY_HTTPS "/system/proxy/secure_host"
+#define GCONF_PROXY_HTTPS_PORT "/system/proxy/secure_port"
+
+#define GCONF_PROXY_SOCKS   "/system/proxy/socks_host"
+#define GCONF_PROXY_SOCKS_PORT "/system/proxy/socks_port"
+#define PORT_LEN    5
+
+
 using namespace std;
 using namespace zypp::base;
 
@@ -295,15 +317,84 @@
 }
 
 /**
+ * Read system proxy using Gconf API
+ * url is the request URL
+ */
+char* get_proxy(const char * url)
+{
+    GError *error = NULL;
+    char *response = "direct://";
+    int port;
+    const char *host = NULL;
+    const char *host_key = NULL, *port_key = NULL;
+
+    char *scheme = NULL;
+
+    if(!strncmp(url, "http://", 7)){
+        host_key = GCONF_PROXY_HTTP;
+        port_key = GCONF_PROXY_HTTP_PORT;
+        scheme = "http://";
+    }else if (!strncmp(url, "socks://", 8)){
+        host_key = GCONF_PROXY_SOCKS;
+        port_key = GCONF_PROXY_SOCKS_PORT;
+        scheme = "socks://";
+    }else if (!strncmp(url, "https://", 8)){
+        host_key = GCONF_PROXY_HTTPS;
+        port_key = GCONF_PROXY_HTTPS_PORT;
+        scheme = "https://";
+    }else if (!strncmp(url, "ftp://", 6)){
+        host_key = GCONF_PROXY_FTP;
+        port_key = GCONF_PROXY_FTP_PORT;
+        scheme = "ftp://";
+    }else{
+        return response;
+    }
+
+
+    withClient(client) {
+        //GConfValue *v = gconf_client_get(client, host_key, &error);
+        GConfValue *v = NULL;
+        gchar* w = gconf_client_get_string(client, host_key, &error);
+        if (w != NULL)
+            host = w;
+        v = gconf_client_get(client, port_key, &error);
+        if (v != NULL)
+            port = gconf_value_get_int(v);
+        if (strlen(host) == 0)
+            return response;
+        response = (char *)malloc (strlen(scheme) + strlen(host) + 1 + PORT_LEN + 1);
+        memset(response, 0, strlen(scheme) + strlen(host) + 1 + PORT_LEN + 1);
+        sprintf(response, "%s%s:%d", scheme, host, port);
+    }
+    
+    return  response;
+}
+/**
  * Reads the system proxy configuration and fills the settings
  * structure proxy information
  */
 void fillSettingsSystemProxy( const Url&url, TransferSettings &s )
 {
-    ProxyInfo proxy_info (ProxyInfo::ImplPtr(new ProxyInfoSysconfig("proxy")));
-    s.setProxyEnabled( proxy_info.useProxyFor( url ) );
-    if ( s.proxyEnabled() )
-      s.setProxy(proxy_info.proxy(url.getScheme()));
+    char *confurl;
+    std::ofstream log;
+    char *env;
+    log.open("/tmp/log123", ofstream::out);
+    cout << "URL:" <<url.asString().c_str() <<endl;
+    env = getenv ("DBUS_SESSION_BUS_ADDRESS");
+
+    confurl = get_proxy(url.asString().c_str());
+    log << "Enabled proxy:" << confurl<< endl;
+    log << "DBUS_SESSION_BUS_ADDRESS:" <<env <<endl;
+    if (strcmp(confurl,"direct://") != 0){
+        s.setProxyEnabled(true);
+        s.setProxy(confurl);
+        free(confurl);
+    }else
+        s.setProxyEnabled(false);
+
+    //for debug:
+    log.close();
+    //end
 }
 
 Pathname MediaCurl::_cookieFile = "/var/lib/YaST2/cookies";
