Squid does not cache file download by FileZilla and apache FTPCLIENT

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Squid does not cache file download by FileZilla and apache FTPCLIENT

david770514
Hello everyone,

I need to implement FTP transfer via Squid proxy.
I use Web browser (Firefox, IE) to download file by my PC after the PC
already set the proxy server from Windows setting. The message in store.log
shows Squid has cached the file on it properly.

The problem is it isn't working when I use "FileZilla" or
"apache.commons.net.ftp.FTPHTTPClient" to download file. I still be able to
download the file from FTP server via Squid proxy, but Squid won't cache the
file. I can't get message about the cache in store.log file.

I tried set proxy server in FileZilla directly(don't set proxy on windows),
and it still not cache, only download the file. Do I need have some special
setting on FTPHTTPClient to make it happen?

Is there anyone can help me?



--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Squid does not cache file download by FileZilla and apache FTPCLIENT

Amos Jeffries
Administrator
On 21/05/20 9:35 pm, david770514 wrote:

> Hello everyone,
>
> I need to implement FTP transfer via Squid proxy.
> I use Web browser (Firefox, IE) to download file by my PC after the PC
> already set the proxy server from Windows setting. The message in store.log
> shows Squid has cached the file on it properly.
>
> The problem is it isn't working when I use "FileZilla" or
> "apache.commons.net.ftp.FTPHTTPClient" to download file. I still be able to
> download the file from FTP server via Squid proxy, but Squid won't cache the
> file. I can't get message about the cache in store.log file.
>
> I tried set proxy server in FileZilla directly(don't set proxy on windows),
> and it still not cache, only download the file. Do I need have some special
> setting on FTPHTTPClient to make it happen?
>
> Is there anyone can help me?
>

Look at what requests is Squid seeing in access.log when you do these
downloads. Then find out what type of messaging the various settings in
that "apache.commons.net.ftp." config do.

* FTP sent as CONNECT tunnels through the proxy cannot be cached.

* FTP Native relay feature of Squid does not yet support caching IIRC.

* FTP sent as ftp:// URLs through the proxy should cache in accordance
with whatever details Squid is able to fetch from the FTP server about
file creation and modification times vs the Cache-Control limits sent by
the client.


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Squid does not cache file download by FileZilla and apache FTPCLIENT

david770514
Hi Amos,

The "apache.commons.net.ftp.FTPHTTPClient" is sent as CONNECT tunnels
through the proxy. Can I make it work through modifying the Squid? Let Squid
can cache file when I sent as CONNECT tunnels through the proxy?



--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Squid does not cache file download by FileZilla and apache FTPCLIENT

Amos Jeffries
Administrator
On 25/05/20 6:06 pm, david770514 wrote:
> Hi Amos,
>
> The "apache.commons.net.ftp.FTPHTTPClient" is sent as CONNECT tunnels
> through the proxy. Can I make it work through modifying the Squid? Let Squid
> can cache file when I sent as CONNECT tunnels through the proxy?
>

Since it uses the tunnel mechanism. No you cannot cache it.

What is inside the tunnel is not just a "file" downloaded. It is a whole
set of FTP messages going back and forth negotiating how the client is
logging into the server (anonymous or not), moving working directory
around within the FTP server and files (possibly more than one)
accessed, metadata about the files, and any temporary TCP connection
details of other tunnels being used for additional pieces of the
communication.

There is simply no way all that stuff can be cached and replayed as-is
to any other client without serious breakage happening.

Sorry, but unless you can find a way to get the client(s) to send Squid
ftp:// URLs requests in HTTP messages there is no caching.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users