Re: [squid-users] accessing ftp server with non anonymous account

From: Delia Micu <djmicu@dont-contact.us>
Date: Fri, 08 Nov 2002 13:41:01 -0800 (PST)

Thank you so much for the replies. I still can't get
Squid to forward the username and password. The client
 uses the HttpUtils found at Apache link
http://jakarta.apache.org/turbine/maven/xref/org/apache/maven/util/HttpUtils.html

Squid runs on a separate server, and the FTP server on
a third server.

When calling the HttpUtils I have:
 
URLConnect.getFile(new
URL("ftp://10.0.12.62/updates.xml"),
    new File("/root/tmp/updatesFTPed.xml"), null,
    true, false, false, "djmicu", "djmicu", "
    10.0.12.101", "3128", null, null);

where
ftpServer = 10.0.12.62
ftpUserName = djmicu
ftpPassword = djmicu
ProxyHost = 10.0.12.101
ProxyPort = 3128
no authentication for the Squid porxy.

The URL used by the Java HttpUtils to create the
URLConnection object is "ftp://10.0.12.62/updates.xml"

But Squid does not pass the ftpUserName and password,
instead it sends the FTP server user anonymous. Could
it be some setting in my config file?

Note, if I use the browser and type url
ftp://djmicu:djmicu@10.0.12.62/updates.xml, I get the
file retrieved. Browser has the proxy set for
ProsyHost 10.0.12.101 on port 3128 for FTP.

Please help me. I don't know what else to do to get
this working correctly from Java.

Thank you much!

Delia

Henrik Nordstrom wrote:

>
> fre 2002-11-08 klockan 10.12 skrev Robert Collins:
>
> > Thats the user interface. It's my understanding the
> browser->proxy
> > interface is via HTTP authentication. Is there an
RFC
> on ftp access via
> > HTTP? And I'd expected a Java class to work at the
> header level, not a
> > GUI style interface.
>
> To make sure there is no misunderstanding, here is a
> description of what
> Squid does:
>
> 1. If it receives a URL with password information
> encoded in the URL
> (<a
href="http://mail.telocity.com/jump/ftp://user:password@host">ftp://user:password@host</a>) this is used as
the login
> information to FTP.
> This is the documented standard method for requesting
> non-anonymous FTP
> via a URL.
>
> 2. If there is only a login (no password) in the
> requested URL then
> Squid will request Basic HTTP authentication from the
> browser to
> complete the request.
>
>
> Alternative 2 is not explicitly documented in
standard,
> but is
> technically a valid thing to do as the HTTP proxy is
> acting as a HTTP
> gateway server when processing ftp:// requests. As it
> is not explicitly
> documented not all browsers expects this to happen.
>
> Regards
> Henrik
Received on Fri Nov 08 2002 - 14:41:05 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:11:15 MST