On Wed, Nov 26, 2008 at 04:53:06PM +0100, Boissonneau Nicolas wrote:
> Ftp "proxy_server_name"
> Then the proxy_server request a user name and the destination name : [EMAIL 
> PROTECTED]
> If the ftp proxy server know the host it will prompt for my 
> proxy_server_password : password
>
> Then the server_data_destination will request it's own 
> server_data_destination_user_name : user_name
> And then it will ask me for my server_data_destination_user_password : 
> user_password

Please try this patch, and do `set ftp:proxy-auth-type [EMAIL PROTECTED]' in 
lftp.

--
   Alexander.
Index: resource.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/resource.cc,v
retrieving revision 1.157
diff -u -p -r1.157 resource.cc
--- resource.cc 15 Aug 2008 11:18:37 -0000      1.157
+++ resource.cc 27 Nov 2008 05:48:13 -0000
@@ -5,7 +5,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -62,9 +62,10 @@ static const char *FtpProxyValidate(xstr
 
 static const char *FtpProxyAuthTypeValidate(xstring_c *s)
 {
-   if(s->ne("user") && s->ne("joined") && s->ne("joined-acct") && 
s->ne("open"))
+   if(s->ne("user") && s->ne("joined") && s->ne("joined-acct")
+   && s->ne("open") && s->ne("[EMAIL PROTECTED]"))
       // for translator: `user', `joined', `joined-acct', `open' are literals.
-      return _("ftp:proxy-auth-type must be one of: user, joined, joined-acct, 
open");
+      return _("ftp:proxy-auth-type must be one of: user, joined, joined-acct, 
open, [EMAIL PROTECTED]");
    return 0;
 }
 
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.448
diff -u -p -r1.448 ftpclass.cc
--- ftpclass.cc 29 Oct 2008 13:08:44 -0000      1.448
+++ ftpclass.cc 27 Nov 2008 05:47:01 -0000
@@ -5,7 +5,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -1383,6 +1383,14 @@ int   Ftp::Do()
                  " ",proxy_user.get(),NULL);
            // proxy_pass is sent later with ACCT command
         }
+        else if(!strcmp(proxy_auth_type,"[EMAIL PROTECTED]") && proxy_user && 
proxy_pass)
+        {
+           expect->Push(Expect::USER_PROXY);
+           
conn->SendCmd2("USER",xstring::cat(proxy_user.get(),"@",hostname.get(),
+                 portname?":":"",portname?portname.get():"",NULL));
+           expect->Push(Expect::PASS_PROXY);
+           conn->SendCmd2("PASS",proxy_pass);
+        }
         else // no proxy auth, or type is `open' or `user'.
         {
            bool use_open=!strcmp(proxy_auth_type,"open");

Reply via email to