aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-02-19 11:53:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-02-19 11:53:54 +0000
commit17e8d60c01f8f020e3738db855584f23fb892a04 (patch)
tree6ff557b749486c4e40b266583de848c41e9e984e /lib/ftp.c
parentec1b3513176b6bac4706de2dc6468dcff3a2e63f (diff)
- Robson Braga Araujo made passive FTP transfers work with SOCKS (both 4 and
5).
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index e0884437a..28ecdcdc1 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1737,6 +1737,23 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
/* this just dumps information about this second connection */
ftp_pasv_verbose(conn, conninfo, newhost, connectport);
+ switch(data->set.proxytype) {
+ case CURLPROXY_SOCKS5:
+ result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
+ SECONDARYSOCKET, conn);
+ break;
+ case CURLPROXY_HTTP:
+ /* do nothing here. handled later. */
+ break;
+ case CURLPROXY_SOCKS4:
+ result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
+ SECONDARYSOCKET, conn);
+ break;
+ default:
+ failf(data, "unknown proxytype option given");
+ result = CURLE_COULDNT_CONNECT;
+ break;
+ }
#ifndef CURL_DISABLE_HTTP
if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
/* FIX: this MUST wait for a proper connect first if 'connected' is