Will Squid Proxy work if it is offline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Will Squid Proxy work if it is offline

Medya
Hi here is my first post in this mailing list, hopefully it is the right place to ask.

Let say I access an image http:///example.com/image1.png and squid proxy caches it,
if I disconnect internet and I try to acesss http:///example.com/image1.png in the browser. will it get the image?

so my general question is, if I have a URL in my cache, will it make any connection to the remote hosting server at all?

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

Re: Will Squid Proxy work if it is offline

Yuri Voinov

You abstractly ask? Purely academically? Or are you pursuing a goal?

It's easier to take and try.

21.12.2017 06:20, Medya пишет:
Hi here is my first post in this mailing list, hopefully it is the right place to ask.

Let say I access an image http:///example.com/image1.png and squid proxy caches it,
if I disconnect internet and I try to acesss http:///example.com/image1.png in the browser. will it get the image?

so my general question is, if I have a URL in my cache, will it make any connection to the remote hosting server at all?


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

-- 
*****************************
* C++20 : Bug to the future *
*****************************

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

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Will Squid Proxy work if it is offline

Yuri Voinov
In reply to this post by Medya

In detail: if the picture is in the cache, and the time of its validation has not arrived - some time will show. In case of all required DNS queries and, especially, answers is also cached.

Harsh reality: Own Squid's DNS cache  is too tiny by default to store half of the Internet addresses. Only few people think of combining it with a caching DNS server of a decent class (at least Unbound).

ALso, just in practice, a disconnected from Internet Squid cache usually shows no more than 20% of content for several sites. That, in fact, corresponds to its real degree of caching.

FInally - no, Squid can't replace cutted Internet.

21.12.2017 06:20, Medya пишет:
Hi here is my first post in this mailing list, hopefully it is the right place to ask.

Let say I access an image http:///example.com/image1.png and squid proxy caches it,
if I disconnect internet and I try to acesss http:///example.com/image1.png in the browser. will it get the image?

so my general question is, if I have a URL in my cache, will it make any connection to the remote hosting server at all?


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

-- 
*****************************
* C++20 : Bug to the future *
*****************************

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

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Will Squid Proxy work if it is offline

Medya
I meant in pure academic sense, not for using in real world.  what is the default validation date, let say we own our own network, can we tell it never expire, or expire in 1 year? so we cache all the photos,and all our private network users can just access the same photo without ever going to public internet?

On Wed, Dec 20, 2017 at 6:29 PM Yuri <[hidden email]> wrote:

In detail: if the picture is in the cache, and the time of its validation has not arrived - some time will show. In case of all required DNS queries and, especially, answers is also cached.

Harsh reality: Own Squid's DNS cache  is too tiny by default to store half of the Internet addresses. Only few people think of combining it with a caching DNS server of a decent class (at least Unbound).

ALso, just in practice, a disconnected from Internet Squid cache usually shows no more than 20% of content for several sites. That, in fact, corresponds to its real degree of caching.

FInally - no, Squid can't replace cutted Internet.


21.12.2017 06:20, Medya пишет:
Hi here is my first post in this mailing list, hopefully it is the right place to ask.

Let say I access an image http:///example.com/image1.png and squid proxy caches it,
if I disconnect internet and I try to acesss http:///example.com/image1.png in the browser. will it get the image?

so my general question is, if I have a URL in my cache, will it make any connection to the remote hosting server at all?
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

-- 
*****************************
* C++20 : Bug to the future *
*****************************
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

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

Re: Will Squid Proxy work if it is offline

Amos Jeffries
Administrator
On 21/12/17 13:39, Medya wrote:
> I meant in pure academic sense, not for using in real world.  what is
> the default validation date, let say we own our own network, can we tell
> it never expire, or expire in 1 year? so we cache all the photos,and all
> our private network users can just access the same photo without ever
> going to public internet?

For academic answers I suggest you read through RFC 7234 and 7232.
  <https://tools.ietf.org/html/rfc7234>
  <https://tools.ietf.org/html/rfc7232>


Squid provides the refresh_pattern directive where you can supply custom
default parameters for the heuristic caching algorithm for responses
which lack sufficient details. The default squid.conf refresh_pattern
definition provides parameters for up to 1 week of caching.

refresh_pattern directive also provides some overrides to make those
heuristics be applied to responses where it SHOULD NOT be used. Be
conservative using those, the person who designed the site has a lot
better knowledge of what could or does go wrong. Everything choice of
theirs you override risks breakage in subtle ways you may not be aware
of nor able to detect easily.
  eg did you ever consider that "photos" includes Captcha and bioprint
authentication details?
  or that content in HTTP/1.1 changes based on which Browser clients are
using?


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