cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Confused with Curl FTP Modes !!!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 19 Oct 2006 16:33:32 +0200 (CEST)

On Thu, 19 Oct 2006, Kabir Patel wrote:

> cURL is wonderful ... and I am new to it. But using a very old cURL 7.8.1
> (reasons best known to those who making me use it)

... and it is more than five years old.

> Issue: I use cURL to download files via a Proxy server. I read that default
> mode of operation for cURL to download file is passive. but the below logs
> creats confusion for me.

The default FTP mode is passive, yes. But when you use a proxy, it switches to
using HTTP with the proxy and you no longer actually use FTP, you only pass an
FTP URL to the proxy using HTTP.

> On proxy server:
>
> TCP IP:1972 IP:21 ESTABLISHED
> TCP IP:1973 IP:20 ESTABLISHED
>
> The above indicates that proxy server is doing a Active FTP.

Perhaps. We don't know and we can't control how the proxy does FTP when we use
it like this.

> Can someone help me out with how to carry out Active and Passive FTPs
> with cURL over a proxy.

You can't affect that, unless you can tunnel through the proxy with -p.

> And also will method differ if proxy is not used.

Sure, since the FTP transfer is done entirely on its own.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-10-19