[plug] squid.. squid-cache?

Greg Orange orange at carey.wa.edu.au
Tue Aug 13 16:54:50 WST 2002


Ok, now I'm really confused.

Can't I just copy the staff server's cache into the student server... and then 
when a machine on the student network tries to browse the 'web' (which there is 
no physical connection to), it goes via the squid cache, thereby 
getting(/displaying) the webpage?

btw, you may need to send me on some reading sprees, coz while I understand some 
basic principles, I'm rather clueless when it comes to implementing most of this 
sorta stuff. Suitable URLs would be greatly appreciated. On routing too... (:

Greg.

Quoting "John Usher (Maptek)" <John.Usher at perth.maptek.com.au>:

> Hey,
> 
> I think the squid redirector script is what you want to play with on
> the
> student squid proxy.
> 
> Basically you would want a list of URL heads that were OK to go to and
> you would do something like:
> 
> while (<>)
> {
> 	if (/^http:\/\/www.youcangohere.com\//)
> 	{
> 		print "$_\n";
> 	} elsif (/^http:\/\/other.address.com\//)
> 	{
> 		print "$_\n";
> 	}
> 	else
> 	{
> 		print "http://local.machine/you.cannot.go.there.html\n";
> 	}
> }
> 
> This is similar to the way adzap (http://www.zip.com.au/~cs/adzap/)
> works, only in reverse - adzap redirects URLS that go to ads to
> youcantgothere.html.
> 
> The tricky bit may be sorting out the content type for images and
> returning a youcantgothere image rather than html. Otherwise you may
> see
> many broken images on your pages.
> 
> You might want to change the above else to:
> 
> else
> {
>   if (/\.(gif|png|jpg|jpeg)$/)
>   {
> 	$mytype = $1;
>   }
>   else
>   {
>       $mytype = "html";
>   }
>   print "http://local.machine/you.cannot.go.there.$mytype\n";
> }
> 
> Along with parenting the student squid to the staff squid.
> 
> This would also mean that the students may be accessing the web
> directly
> through the cache heirarchy, meaning you don't have to precache the
> pages.
> 
> If you are using transproxy, you would have to replace the machine
> names
> with IP addresses, which also means you have to make sure you get all
> the IP addresses when a name maps to more than one address. Some .coms
> map to MANY ip addresses.
> 
> ...John...
> 
> 
> 
> -----Original Message-----
> From: Greg Orange [mailto:orange at carey.wa.edu.au] 
> Sent: Tuesday, 13 August 2002 4:02 PM
> To: plug at plug.linux.org.au
> Subject: Re: [plug] squid.. squid-cache?
> 
> 
> Nope, the student network is completely cut off from the rest of the
> world. I'll 
> play with routing in a few months when I get the chance (: (the idea
> being to 
> connect the two networks together)
> 
> So I'd have an external device to transport data between the two
> networks 
> para-manually. ie plug/unplug into staff network, plug/unplug into
> student 
> network.
> 
> I guess you could say it's not a networking question, it's a
> squid/caching 
> question. As for browser proxies - I've got transproxy running.
> 
> Thanks,
> Greg.
> 
> Quoting Paul Dean <paul at thecave.cantech.net.au>:
> 
> > Hya,
> > 
> > A couple of questions...
> > Does the student network have a connection to the Internet? If so is
> > it
> > permanent too?
> > 
> > Do you have dynamic or static IP's?
> > 
> > The direction I'm going down is the you can setup the Staff Squid
> > proxy
> > to be the 'parent' proxy for the Student network via the Internet.
> > The line in squid.conf for the student network;
> > 'cache_peer proxy.carey.wa.edu.au parent 3128 3130'
> > The address and ports need to be correct though.
> > 
> > On the staff network you will need have the specified ports open so
> > squid can connect.
> > 
> > You can then setup ACL's for you cache's to work together.
> > 
> > The only fall back is that is only caches "browsed" web sites,
> meaning
> > you must first have someone browse the site and then it will be
> > cached,
> > which I think the same ruling for scache, but won't update
> > workstations
> > local cache you will need to set the browser to do that.
> > 
> > On the workstations setup them to use a proxy on the ports you want
> > them
> > on.
> > 
> > I trust this is on the right track for you.
> > 
> > Hope this helps.
> > 
> > On Tue, 13 Aug 2002, Greg Orange wrote:
> > 
> > <snipo> 
> > 
> > -- 
> > Paul...
> > 
> > /***** Experience is that marvelous thing that enables you to 
> > 	recognize a mistake when you make it again. 
> > 	-- Franklin P. Jones *****/
> > 
> > /*****All programmers are playwrights and all computers are lousy
> > actors.
> >            -- Unknown*****/
> > 
> > /* How smart are Computers? They seem to need instructions all the
> > time... 
> > 	-- Me */
> > 
> > 
> > 
> 
> 
> 
>  - ---- -----
> Greg Orange
> IT Support
> Carey Baptist College        http://www.carey.wa.edu.au
> 
> 



 - ---- -----
Greg Orange
IT Support
Carey Baptist College        http://www.carey.wa.edu.au



More information about the plug mailing list