cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl over an ftp proxy?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 14 Apr 2003 15:50:59 +0200 (CEST)

On Mon, 14 Apr 2003, Philip Newton wrote:

> Hi, I'm trying to use curl over an ftp proxy. (I'm using the precompiled
> curl 7.10.4 with ssl on cygwin 1.3.18.)
>
> However, this does not seem to work... I see only one command-line option
> "proxy" which does not differentiate between HTTP and FTP use.

There is no support for "ftp proxies", no. The reasons for this are:

1. No one ever implemented it.
2. No one ever requested it.
3. I don't use one or need one.
4. There are no standards defining how they're supposed to work
5. No one ever told me how they work.

> The manual states that curl pays attention to the FTP_PROXY environment
> variable, which is said to be of the form [protocol://]<host>[:port] , so I
> tried setting it to ftp://proxy . That didn't work because curl tried to
> access port 1080, so I changed it to ftp://proxy:21 , which also failed --
> curl could then connect to the proxy but tried to fetch the file with "GET
> ftp://servername/file HTTP/1.1", which is HTTP, not FTP.

libcurl only supports HTTP and socks5 proxies, and when I look at it now, you
can't even tell curl (the command line tool) to use socks5...

> Looking around, I saw this message (
> http://curl.haxx.se/mail/lib-2001-03/0001.html ) from two years ago stating
> that curl doesn't support FTP proxies... is this still the case? Are there
> any plans for FTP proxy support in the future?

I personally never add features just for the sake of adding things, I add
features because I need them or others tell me they'd like them.

Until your mail now, I didn't think anyone wanted this.

> (For what it's worth, our proxy uses the following method to connect to
> "remotehost" as "user" with password "password":
>
> USER user_at_remotehost
> PASS password
>
> That is, instead of connecting to "remotehost" and saying "USER user", curl
> should connect to my proxy and say "USER user_at_remotehost". I believe there
> are also other ftp proxies which require different syntax, but in other
> programs supporting these, I haven't seen more than six or seven methods,
> so the diversity is not infinite.)

I figure you can handicraft a command line to curl that'll use your proxy
correctly?

Something like:

  curl ftp://user%40remotehost:password@ftpproxyhost/path/to/remote/file

> I can use curl over our HTTP proxy, but it seems a bit wrong; it would be
> nice to get it to work over the FTP proxy as well.

Would you be capable of providing us with a patch for this?

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-14