curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP Proxy Server support in Libcurl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 23 Nov 2016 11:35:00 +0100 (CET)

On Wed, 23 Nov 2016, Carlos Rimola wrote:

> 1) What form of FTP Proxy (servers) does Libcurl support? (RFCs?). Any
> specific examples like ftp-proxy or squid?

Amusingly enough, I answered almost this question already 13 years ago:
https://curl.haxx.se/mail/archive-2003-04/0120.html

Strictly speaking, there's no formal support for proxy in the FTP protocol at
all. There are not RFCs for that and there's not even any proper informal
standards.

There are three ways to do proxying with FTP:

1 - abuse the existing FTP protocol but send data in "wrong" fields. Like
     pass in the actual remote host name as user:

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

2 - just ask for a ftp:// URL over a HTTP proxy and hope for the best

3 - tunnel through a HTTP proxy with *PROXYTUNNEL which makes libcurl use
   CONNECT - this kind of operation is often blocked by HTTP proxies.

> is not Libcurl's issue but mainly the weak definition of FTP Proxy in the
> RFCs? However RFC-1919 ("Classical versus Transparent IP Proxies") seems to
> clear much of how to make FTP proxies operate.

RFC 1919 is over 20 years old and I can agree that it discusses how
connections work for proxies but it certainly does not detail enough how an
FTP proxy should work or be used by a client such as curl.

I think people have managed to get pass with the above methods so nobody ever
implemented support for other for further ftp-proxies. FTP is hardly a
protocol on the rise these days which I suppose also helps explain the lack of
interest.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-11-23