[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Antwort: Re: Antwort: Re: Antwort: RE: FTP over proxy



I think I recognized that this one is unusual/special by naming one of the "proxy" constants GENUGATE after the specific type of login needed in this case and by noting that special coding is required if using GENUGATE.

Wouldn't the correct procedure be something like what I laid out with special coding for GENUGATE? We'd want a generic set of "proxy procedures" that would have the specific coding required inside the generic procedures. As more requirements came up for different proxies, we'd work them into the procedures.  If you think it best, we could have a FTP_Login_GenuGate procedure, but I was kind of trying to avoid exposing another large group of "Login" procedures. Keeping these things inside FTP_Login_Proxy would keep things tidy.

If a FTP_Login_GenuGate was created...would/should it handle the whole login procedure or just the proxy login?

I've never had to use a proxy that didn't recognize the user$user$site.com (or user@user@site.com) convention and frankly, after having used that method for 15 years, I don't see any downside.  FTP proxies should take care of this kind of stuff for us. Looking in my current PC FTP client, I see lots of possibilities for proxy logins. Hope we don't have to go there (shouldn't plain vanilla FTP be going away anyway?!?!?), but I think what I laid out gives us a shot at helping people get there if it does come up.

  


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, July 08, 2011 7:07 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Antwort: Re: Antwort: Re: Antwort: RE: FTP over proxy

Mike,

The problem with this is that there are different proxies that work 
differently from each other.  I've worked with two different types of 
FTP proxy, myself (including writing one from specs) and neither of them 
works like the one Hans is using.

So please don't make additions and call them "proxy".  You need to name 
them after the specific type of proxy, lest users get the idea that 
it'll work with any/all proxy.


On 7/8/2011 6:19 PM, Mike Krebs wrote:
> Hans,
>
> Let's see if we can figure this out:
> Assumptions:
>   The proxy address is used for both the proxy authentication and to send actual FTP commands to.
>   The user and password for the proxy could be different from the user and password of the FTP server.
>   Therefore we will need a new way to "login" but we already know how to do that, just that we have to treat the proxy slightly different.
>
>
> Here is a suggestion (not sure this is exactly right or the best way to handle it):
>
> Create a new parameter of wkSession called wkProxy. In this field keep a value that indicates possible different ways of using the proxy service. For now, it will only have two (maybe three) values.
>
> D   wkProxy                     10I 0 INZ(0)
>
> D NOPROXY         C                   const(0)
> D USERAFTERUSER   C                   const(1)
> D GENUGATE        C                   const(278)
>
> Create a procedure similar to FTP_passiveMode that accepts the Proxy value for second parameter. If using proxy, set it by calling new procedure FTP_setProxy(GENUGATE). (basic code would be wkProxy = passedValue)
>
> Look at procedure FTP_LoginLong. In there, you will find the code to login to a server.
>
> Create a new procedure like that one that is called FTP_LoginProxy.
>
> Create a section in the code that looks something like this:
>
> Select
> When  wkProxy = USERAFTERUSER (or GENUGATE);
>   (dup the login part of FTP_LoginLong)
>   (adjust error messages to reflect Proxy login errors)
>   (If GENUGATE, accept the bad/no response to the login as being valid)
> ENDSL
>
> So, to use a proxy, your code would look something like this:
> FTP_setProxy(GENUGATE);
> Session = FTP_open("proxy host");
> Rc = FTP_LoginProxy(session:user:pass);
> Rc = FTP_Login(session: anon@xxxxxxxxxxxx: passIfRequired)
>
> Might need some work but it looks like it might be functional.
>
> Of course, you should post the code back to the forum once you have it tested.
>
> Good luck.
>
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Hans.Bertol@xxxxxx
> Sent: Friday, July 08, 2011 5:48 AM
> To: HTTPAPI and FTPAPI Projects
> Subject: Antwort: Re: Antwort: Re: Antwort: RE: FTP over proxy
>
> this sounds not good for me,
> is there any chance for us?
>
> mit freundlichen Grüßen
>
> Hans Bertol, ITF1
> _________________________________
> Hans Bertol
> MAN Nutzfahrzeuge Österreich AG
> Geschäftseinheit Spezialfahrzeuge
> Factory IT Integration&  Coordination (ITF1)
> und
> Notes Administration Österreich
> Brunner Strasse 44-50
> 1230  Wien
> Tel: +43-1-86631-2129
> Mob +43-664-1000934
> mailto:Hans.Bertol@xxxxxx
>
>
>
> Scott Klement<sk@xxxxxxxxxxxxxxxx>
> Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> 07.07.2011 19:46
> Bitte antworten an
> HTTPAPI and FTPAPI Projects<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
>
>
> An
> HTTPAPI and FTPAPI Projects<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: RE: FTP over proxy
>
>
>
>
>
>
> You're right... now that I see the result, I see that it's not going to
> work.  Oh well, it was worth a try.
>
> Hans, this isn't going to work unless you modify FTPAPI.
>
>
> On 7/7/2011 3:42 AM, Hans.Bertol@xxxxxx wrote:
>>
>>      This work till the second login.
>>      then the programm hangs
>>      Code look now like this:
>>      C                   EVAL      sess          = ftp_open(ProxyHost)
>>
>>      C                   IF        sess<   0
>>
>>      C                   EVAL      Msg           = ftp_errorMsg(0)
>>
>>      C                   RETURN
>>      C                   ENDIF
>>
>>
>>
>>      C                   CALLP     ftp_Login(sess: ProxyUserId:
>>      ProxyUsrPwd)
>>
>>
>>      C                   EVAL      Login       = %Trim(UserId) + '@' +
> Host
>>      C                   CALLP     ftp_Login(sess: Login)
>>      C                   IF        sess<   0
>>      C                   EVAL      Msg         = ftp_errorMsg(0)
>>
>>      C                   ENDIF
>>
>>      Log:
>>      0: FTPAPI version 2.3 released on 2010-05-27
>>      1: 220- GeNUGate-FTP-Relay OK.
>>      1: 220- Authenticate with: pass
>>      1: 220  OK
>>      1:>   USER ua3hb
>>      1: 331 Password required for method pass
>>      1:>   PASS **********
>>      1: 220- GeNUGate-FTP-Relay OK.
>>      1: 220- Login with User@Host
>>      1: 220- Please use Passive Mode (pasv)
>>      1: 220  OK
>>       *SYSTEM/ENDRQS        (after two minutes)
>>      mit freundlichen Grüßen
>>      Hans Bertol, ITF1
>>      _________________________________
>>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
>
>
> ********************************************
>
> Die Firmendaten unserer Gesellschaften gemäß § 14 UGB finden Sie unter "Impressum" auf www.man.at.
>
> This e-mail (including any attachments) is confidential and may be privileged.
> If you have received it by mistake, please notify the sender by e-mail and delete this message from your system.
> Any unauthorised use or dissemination of this e-mail in whole or in part is strictly prohibited.
> Please note that e-mails are susceptible to change.
> MAN Nutzfahrzeuge Österreich AG (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt.
> MAN Nutzfahrzeuge Österreich AG (or its group companies) does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.
>
> ********************************************
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------