cURL / Mailing Lists / curl-users / Single Mail

curl-users

using an http proxy for ftp downloads

From: TJ Herring <tjherring_at_gmail.com>
Date: Tue, 12 Jul 2011 09:56:48 -0500

Hi... I have experienced an issue while trying to use my http proxy for
accessing an FTP download site.

I have followed the instructions to set the http_proxy, ALL_PROXY
environment variables. This works correctly for http transfers, but I can't
seem to make it work for ftp.

This does not work:
1. export http_proxy=http://username:password@proxy.my.domain:8080
2. export ALL_PROXY=$http_proxy
3. Invoke 'curl ftp://ftp.kernel.org'
4. This results in a long wait time eventually timing out. The message
displayed is : 'curl: (7) Failed to connect to 2001:4f8:8:10:1994:313:1:::
No route to host'
5. Noticing the ipv6 address I also tried 'curl -4 ftp://ftp.kernel.org'
which resulted in 'curl: (7) couldn't connect to host'
NOTE: I also tried setting FTP_PROXY.

This DOES work:
1. Invoke 'curl -x http://username:password@proxy.my.domain:8080
ftp://ftp.kernel.org
2. Results in the proper listing of the ftp site.

This was the same result with curl v7.19.7 on Mac OS and curl v7.19.7 on
Ubuntu v10.04.2

What am I missing? Why is the -x option acting differently than using the
environment variables? I cannot seem to find anything in the man page that
helps me.

Thanks

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-12