Jump to content

Squid Web Caching - Help

nfojas

Hi Guys,

 

This is my first post here hope you guys can help me.

 

I have an Internet Cafe/LAN Shop and I wanted to setup squid proxy server and use its web caching capability (specifically to cache youtube videos).

 

Getting a high speed internet possible is not possible from where I am right now. Currently I only have a 3 Meg DSL and another 5 Meg DSL (with a 15GB/day network cap).

 

My 5 meg is dedicated for online games and my 3 meg is for internet browsing and watching youtube videos. and that 3 meg is always utilized at its peak speed. 

 

Been doing my research for a quite sometime now and I could not find a clear way of doing. I only see it on youtube video that other people are able to make it work but is not sharing how they did it.

 

 

Hope you guys can help me.

 

Thanks!

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Welcome! 

 

I'm assuming you've got as far as installing etc on your server? Could you explain a little about your environment, which OS's are we using for a start? How is your network setup in terms of from the client give us every place it hits before going out on the internet?

 

Any other background information you think will help, chuck it in!

System/Server Administrator - Networking - Storage - Virtualization - Scripting - Applications

Link to comment
Share on other sites

Link to post
Share on other sites

Ok, this will probably not help much... but here we go, this is an old squid configuration file that i found on some of my backups

 

############### REFRESH PATTERN ###############

 
refresh_pattern -i \.(htm|html|asp|xml|class|css|js|swf|ico|cur|ani|jpg|jpeg|bmp|png|cdr|txt|gif|dll|php|aspx) 43200 99% 43200 ignore-no-cache  override-expire override-lastmod 
 
refresh_pattern -i \.(rar|jar|gz|tgz|bz2|exe|msi|iso|m1v|m2(v|p)|mo(d|v)|arj|lha|lzh|zip|tar|deb|rpm|bin) 43200 99% 43200 ignore-no-cache  override-expire override-lastmod 
 
refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod 
 
#refresh_pattern -i \.(3gp|7z|ace|asx|divx|dvr-ms|ram|inc|cab|qt)43200 99% 43200 ignore-no-cache override-expire override-lastmod 
 
refresh_pattern -i \.(avi|ac4|mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rm|r(a|p)m|snd|vob) 43200 99% 43200 ignore-no-cache override-expire override-lastmod 
 
refresh_pattern -i \.(mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rar|rm|r(a|p)m|snd|vob|wav) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod 
 
refresh_pattern -i \.(pp(t?x)|s|t)|pdf|rtf|wax|wm(a|v)|wmx|wpl|cb(r|z|t)|xl(s?x)|do(c?x)|flv|x-flv) 43200 99% 43200 ignore-no-cache override-expire override-lastmod 
 
refresh_pattern -i \.(bin|deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|docx|tiff|pdf|uxx|gz|xls|swf|psd|js|crl)$ 10080 90% 43200 ignore-no-cache ignore-private override-expire override-lastmod 
 
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod
 
refresh_pattern (get_video\?|videoplayback\?id|videoplayback.*id|videodownload\?|\.flv?) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod 
 
refresh_pattern \.(ico|video-stats) 129600 999999% 129600 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth override-lastmod 
 
refresh_pattern (cgi-bin|\?) 0  0% 0 ignore-no-cache ignore-private override-expire override-lastmod 
 
refresh_pattern ^gopher: 1440 0% 1440 ignore-no-cache ignore-private override-expire override-lastmod 
 
refresh_pattern ^ftp: 10080 95% 43200 ignore-no-cache ignore-private override-expire override-lastmod 
 
refresh_pattern . 0 40% 40320 ignore-no-cache ignore-private override-expire override-lastmod 

 

I think this is for squid 2, you have some new flags on squid 3 that can be useful, you have to read the documentation and test

 

Actually, reading further on the issue it seems that, for youtube you will need an extra excript to cache and redirect to the cached video, you will find it on squid's manual

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×