cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: FTP third party transfer (proxy) support.

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 19 May 2004 11:26:01 +0200 (CEST)

On Tue, 18 May 2004, Alexander Krasnostavsky wrote:

> >> * url: ftp://user:password@host/path#user:password@host/path
> >>
> >> Source#Target
>
> > I don't understand this. The CURLOPT_URL should be the source file to
> > transfer I take it, but then you need pretty much a whole second URL for
> > the target, won't you?

...

> So, because there is no need for "classic" local client that actually
> reads/writes to file at the local host "C", we need to specify in the url
> all the parameters for the target host "B" too.

Right, so wouldn't then make sense to have a "target URL" and use the original
one as source URL?

> "3rd party transfers" and ftp-proxying are the same concept.

Ok, but let's call this "3rd party transfers" then, as "proxy" is often used
to refer to other functionality.

> Proxy is the "FTP" server mode. I prefer to call source and target
> hosts.
> But it is required to change the options from CURLOPT_PREQUOTE and
> CURLOPT_POSTQUOTE to CURLOPT_SOURCEPREQUOTE, CURLOPT_SOURCEPOSTQUOTE and
> CURLOPT_TARGETPREQUOTE, CURLOPT_TARGETPOSTQUOTE

No, I'd rather keep the "source" ones the main ones and we can leave them as
is, as I believe most FTP transfers will continue to not be 3rd party and thus
will only involve one ftp server. The "target"-versions make sense to me now.

> About CURLOPT_FTPPROXYLISTONLY - because in proxy mode we have 2 connections
> with 2 remote hosts, we can actually perform the LIST command on both. It is
> just for the uniform interface.

Ah, right. Not that I think it makes much sense to issue LIST on two servers
"at once".

> >> * Is there a way to work with OpenSSL mode between remote hosts?
>
> > I haven't read up on 3rd party transfers and how they are setup and
> > work, so I really can't tell right now.
>
> May be now from Figure 2 you are able to answer. I have no experience with
> SSL and how it implemented.

Yes, now I can see that they certainly could use TLS/SSL exactly in the same
way it is used for ordinary FTP. Check out the Curl_ftp_connect() function and
you'll see how the "AUTH" command is used to switch over to a secure control
connection. It then later issues 'PROT P' to instruct that server that the
upcoming data connection should be "private" - meaning it should be using
TSL/SSL as well.

> Please approve the interface changes and reply with any additional questions
> you have in this issue.

I still haven't really understood how you're gonna specifiy target URL, and I
think that the biggest changes needed in libcurl will be to handle two copies
of lots of data that only exists in one single instance today (user name,
password, bla bla).

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-19