cURL / Mailing Lists / curl-library / Single Mail

curl-library

FTP extended passive mode over SOCKS proxy

From: Anton Malov <malov.anton_at_gmail.com>
Date: Wed, 7 Nov 2012 14:16:50 +0400

Let's look at libcurl trying to retrieve a file from FTP server with
default settings:
1) connection and login steps;
2) EPSV command, receiving server's open port and trying to connect;
3) If step 2 fails (due to firewall restrictions for example) trying
to send PASV command and retrieve server's port number in old
fashioned way, else step 4;
4) receiving file if data connection is established.

The point is that libcurl correctly handles (switching to PASV mode)
connection error in step 2 in the case of direct connection and
returns CURLE_COULDNT_CONNECT if we trying to connect via SOCKS proxy,
thus aborting file retrieval because of proxy connection error. In my
test setup I use local proxy and have no access to company's firewall
but the firewall (TMG) can analyze FTP traffic and open required ports
for PASV commands and doesn't support EPSV.
I think libcurl should correctly handle step 2 in the case of proxy
connection. Does this behavior should be considered as bug? Should I
file a bug report for this?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-11-07