diff --git src/daemon/common/commonOptions.ml src/daemon/common/commonOptions.ml
index 60542fc..8466464 100644
--- src/daemon/common/commonOptions.ml
+++ src/daemon/common/commonOptions.ml
@@ -1130,13 +1130,19 @@ let http_proxy_port = define_option current_section ["http_proxy_port"]
   "Port of HTTP proxy"
     port_option 8080
 
+let http_proxy_login = define_option current_section ["http_proxy_login"]
+  "HTTP proxy login (leave empty if proxy doesn't require authentication)"
+    string_option ""
+
+let http_proxy_password = define_option current_section ["http_proxy_password"]
+  "HTTP proxy password"
+    string_option ""
+
 let http_proxy_tcp = define_option current_section ["http_proxy_tcp"]
   "Direct TCP connections to HTTP proxy (the proxy should support CONNECT)"
     bool_option false
 
 
-
-
 (*************************************************************************)
 (*                                                                       *)
 (*                         Mail section                                  *)
@@ -2052,14 +2058,20 @@ let http_proxy_tcp_update _ =
 
 let _ =
   let proxy_update _ =
-    http_proxy :=
-    (match !!http_proxy_server with
-        "" -> None
-      | _  -> Some (!!http_proxy_server, !!http_proxy_port));
+    let auth = match !!http_proxy_login with
+    | "" -> None
+    | _ -> Some (!!http_proxy_login, !!http_proxy_password)
+    in
+    http_proxy := 
+      (match !!http_proxy_server with
+      | "" -> None
+      | _  -> Some (!!http_proxy_server, !!http_proxy_port, auth));
     http_proxy_tcp_update ()
   in
   option_hook http_proxy_server proxy_update;
   option_hook http_proxy_port proxy_update;
+  option_hook http_proxy_login proxy_update;
+  option_hook http_proxy_password proxy_update;
   option_hook http_proxy_tcp http_proxy_tcp_update
 
 let _ =
diff --git src/utils/net/http_client.ml src/utils/net/http_client.ml
index 7b67ac9..7034858 100644
--- src/utils/net/http_client.ml
+++ src/utils/net/http_client.ml
@@ -44,7 +44,7 @@ type request = {
     req_headers : ( string * string ) list;
     req_user_agent : string;
     req_accept : string;
-    req_proxy : (string * int) option;
+    req_proxy : (string * int * (string * string) option) option; (* (host,port,(login,password)) *)
     mutable req_url : url;
     mutable req_save_to_file_time : float;
     req_request : http_request;
@@ -106,9 +106,15 @@ let make_full_request r =
   Printf.bprintf res "User-Agent: %s\r\n" r.req_user_agent;
   Printf.bprintf res "Accept: %s\r\n" r.req_accept;
   Printf.bprintf res "Connection: close\r\n";
- (match r.req_referer with None -> ()
-    | Some url -> 
-        Printf.bprintf res "Referer: %s\r\n" (Url.to_string_no_args url));
+  begin match r.req_referer with 
+  | None -> ()
+  | Some url -> Printf.bprintf res "Referer: %s\r\n" (Url.to_string_no_args url)
+  end;
+  begin match r.req_proxy with
+  | Some (_,_,Some (login,password)) ->
+      Printf.bprintf res "Proxy-Authorization: Basic %s\n" (Base64.encode (login ^ ":" ^ password))
+  | _ -> ()
+  end;
   if url.user <> "" then begin
     let userpass = Printf.sprintf "%s:%s" url.user url.passwd in
     Printf.bprintf res "Authorization: Basic %s\r\n" (Base64.encode userpass)
@@ -225,7 +231,7 @@ let rec get_page r content_handler f ferr =
     let server, port =
       match r.req_proxy with
       | None -> url.server, url.port
-      | Some (s, p) -> s, p
+      | Some (s, p, _) -> s, p
     in
 (*    lprintf "async_ip ...\n"; *)
     Ip.async_ip server (fun ip ->
diff --git src/utils/net/http_client.mli src/utils/net/http_client.mli
index fdb568d..e82cb97 100644
--- src/utils/net/http_client.mli
+++ src/utils/net/http_client.mli
@@ -35,7 +35,7 @@ type request = {
     req_headers : ( string * string ) list;
     req_user_agent : string;
     req_accept : string;
-    req_proxy : (string * int) option;
+    req_proxy : (string * int * (string * string) option) option; (** (host,port,(login,password)) *)
     mutable req_url : Url.url;
     mutable req_save_to_file_time : float;
 (* re-download a saved file only if newer *)
diff --git src/utils/net/tcpBufferedSocket.ml src/utils/net/tcpBufferedSocket.ml
index 9cdbb47..4fd8f41 100644
--- src/utils/net/tcpBufferedSocket.ml
+++ src/utils/net/tcpBufferedSocket.ml
@@ -1044,8 +1044,8 @@ let set_reader t f =
       f
     else
     match !http_proxy with
-      None -> f
-    | Some (h, p) ->
+    | None -> f
+    | Some _ ->
         fun sock nread ->
 (* HTTP/1.0 200 OK\n\n *)
           let b = buf sock in
@@ -1328,10 +1328,10 @@ let connect token name host port handler =
     let s = Unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
     if !bind_address <> Unix.inet_addr_any then
       Unix.bind s (Unix.ADDR_INET (!bind_address, 0));
-    let proxy_ip, proxy_port =
+    let proxy_ip, proxy_port, proxy_auth =
       match !http_proxy with
-        None -> Ip.null, 0
-      | Some (h, p) -> Ip.from_name h, p
+      | None -> Ip.null, 0, None
+      | Some (h, p, auth) -> Ip.from_name h, p, auth
     in
     let ip = Ip.of_inet_addr host in
     let use_proxy = proxy_ip <> Ip.null && proxy_ip <> ip in
@@ -1347,7 +1347,11 @@ let connect token name host port handler =
         Printf.bprintf buf "Cache-Control: no-cache\n";
         Printf.bprintf buf "Connection: Keep-Alive\n";
         Printf.bprintf buf "Proxy-Connection: Keep-Alive\n";
-(*Printf.bprintf buf "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; Hotbar 2.0)\n";*)
+        begin match proxy_auth with
+        | Some (login,password) ->
+            Printf.bprintf buf "Proxy-Authorization: Basic %s\n" (Base64.encode (login ^ ":" ^ password))
+        | None -> () 
+        end;
         Printf.bprintf buf "User-Agent: MLdonkey/%s\n" Autoconf.current_version;
         Printf.bprintf buf "\n";
         ignore (MlUnix.write s (Buffer.contents buf) 0 (Buffer.length buf))
diff --git src/utils/net/tcpBufferedSocket.mli src/utils/net/tcpBufferedSocket.mli
index 1114538..b70bfcc 100644
--- src/utils/net/tcpBufferedSocket.mli
+++ src/utils/net/tcpBufferedSocket.mli
@@ -146,7 +146,7 @@ val minimal_packet_size : int ref
   
 val get_rtimeout : t -> float * float
   
-val http_proxy : (string * int) option ref
+val http_proxy : (string * int * (string * string) option) option ref (* (host, port, (login, password)) *)
 val copy_read_buffer : bool ref
   
 type connection_manager
