I need to access some FTP server using wget behind an squid proxy.

I have my environment vars defined this

---------------------------
$ printenv | grep -i proxy
http_proxy=http://127.0.0.1:3128
FTP_PROXY=ftp://127.0.0.1:3128
ftp_proxy=ftp://127.0.0.1:3128
HTTPS_PROXY=https://127.0.0.1:3128
https_proxy=https://127.0.0.1:3128
HTTP_PROXY=http://127.0.0.1:3128
---------------------------

but when I try to use a FTP URL with wget, this is the result:

---------------------------
$ wget ftp://user:[email protected]/
--2016-10-31 xx:xx:xx--  ftp://user:*password*@some.site.com/

Connecting to 127.0.0.1:3128... connected.
Logging in as user ...
Error in server response, closing control connection.
Retrying.

--2016-10-31 xx:xx:xx--  ftp://some.site.com/
  (try: 2) => ‘.listing’
Connecting to 127.0.0.1:3128... connected.
Logging in as user ...
Error in server response, closing control connection.
Retrying.
.
.
.
---------------------------

When I paste the same URL on firefox, FF send the request as a HTTP request
to an HTTP proxy (a normal GET request) and it doesn't try to use the proxy
as an FTP proxy (as wget does). Is it any way to make wget do the same?

I have tried to leave ftp_proxy and FTP_PROXY unset to no avail (wget then
tries to connect directly, without using any proxy). Because this server is
connected to the internet through a parent proxy, not directly, this also
fails.

Does anyone knows how to force wget to access the FTP server using the HTTP
proxy (the same way that FF does)?

Reply via email to