I think it's a SOCKS5 proxy.  For the Solaris FTP client, I supply
"[EMAIL PROTECTED] proxy-user" at the user prompt.

I think I was wrong about the downloaded file.  It probably contains
the dialog between wget and my proxy server, not between wget and the
remote FTP server.

On 6/8/07, Jochen Roderburg <[EMAIL PROTECTED]> wrote:
Zitat von Phillip Griffith <[EMAIL PROTECTED]>:

> The problem, briefly, is that wget is sending HTTP GET commands to an
> FTP server when there's a proxy server in the middle.
>
> My .wgetrc file contains the following entries.  I've redacted all the
> values, except for the port number on the FTP proxy, which seems to be
> important:
>
> ftp_proxy = ftpgate.yoyodyne.com:21
> proxy_user =
> proxy_passwd =
> ftp_user =
> ftp_passwd =
>
> (There is some confusion on my end over the spelling of proxy_passwd
> and ftp_passwd, since my first instinct was to spell them
> "proxy_password" and "ftp_password".)
>
> Here we go with invoking wget.  Again, I have redacted things like
> hostnames, user names, and passwords:
>
> wget --debug ftp://some-vendor.com/some-directory/some.pdf
> DEBUG output created by Wget 1.10.2 on solaris2.9.
>
> --12:20:20--  ftp://some-vendor.com/some-directory/some.pdf
>            => `some.pdf.1'
> Resolving ftpgate.yoyodyne.com... 192.168.2.4
> Caching ftpgate.yoyodyne.com => 192.168.2.4
> Connecting to ftpgate.yoyodyne.com|192.168.2.4|:21... connected.
> Created socket 4.
> Releasing 0x0005c7d0 (new refcount 1).
>
> ---request begin---
> GET ftp://some-vendor.com/some-directory/some.pdf HTTP/1.0
> User-Agent: Wget/1.10.2
> Accept: */*
> Proxy-Authorization: Basic Yadda yadda [redacted] ....=
> Host: some-vendor.com
>
> ---request end---
> Proxy request sent, awaiting response...
> ---response begin---
> ---response end---
> 200 No headers, assuming HTTP/0.9
> Length: unspecified
>
>     [         <=>                         ] 498           --.--K/s
>  ^
>
> At this point the download stalls and I hit ^C.
> Here are the contents of the downloaded file, "some.pdf.1":
>
> 220 Secure Gateway FTP server ready.
> 500 Syntax error, command unrecognized: 'GET
> ftp://some-vendor.com/some-directory/some.pdf HTTP/1.0'
> 500 Syntax error, command unrecognized: 'User-Agent: Wget/1.10.2'
> 500 Syntax error, command unrecognized: 'Accept: */*'
> 500 Syntax error, command unrecognized: 'Proxy-Authorization: Basic
> Yadda yadda [redacted] ....='
> 500 Syntax error, command unrecognized: 'Host: some-vendor.com'
> 500 Syntax error, command unrecognized: ''
>
> I can retrieve files just fine through this proxy server using the
> Solaris FTP client, which makes me think the problem is with wget.  Or
> else I'm making some rookie mistake.
>

Thanks for providing more details. I think we are getting nearer now ;-)
This proxy/gateway does not look at all like the http-proxy I described in an
earlier message and what wget and browsers use when you tell them something
about a "proxy for ftp".

How do you specify the real ftp-host then when you use the Solaris ftp client?
If it is something simple like login with "[EMAIL PROTECTED]" then it should be
possible with wget also (without mentioning a proxy to wget). If it is some
special internal mechanism, however, then I fear it will not be possible with
wget (because it only knows the http-proxy type).

Jochen Roderburg
ZAIK/RRZK
University of Cologne
Robert-Koch-Str. 10             Tel.:   +49-221/478-7024
D-50931 Koeln                   E-Mail: [EMAIL PROTECTED]
Germany


Reply via email to