VideoCache
Videocache is no longer in development.

VideoCache + Thundercache

by Anonymous on 25 Jul 2009

Hi Kulbir,

Thudercache is a program to cache some programs like AVG, WindowsUpdate, Youtube and etc. However, it's not so much efficient like VideoCache for videos. And in it can be disabled some caches, like Youtube.

I'm trying to use Videocache and Thundercache together, because I want to cache videos and some programs. I was following squidguard and videcache's tutorial, but I didn't have success.

Do you think these programs can work togheter? I want Videocache doing cache of Youtube, UOL... And Thundercache doing cache of WindowsUpdate, AVG, Norton and etc.

Best regards,

Júlio Henrique

3 Answers

by Kulbir Saini on 26 Jul 2009

Hi Julio,

Well, Thundercache should work side by side with Videocache without any problems because they are two squid plugins. I just want to confirm you that videocache and thunder cache use same squid directives like url_rewrite_program etc. Also, you can follow this tutorial on integrating two squid plugins.

Thank You!

by Júlio Henrique de Oliveira on 26 Jul 2009

Hi Kulbir,

I followed this tutorial and my squid.conf is:

########### VIDEOCACHE #################### 
url_rewrite_program /usr/local/bin/zapchain "/etc/squid/loader.php" "/usr/bin/python /usr/share/videocache/videocache.py"
url_rewrite_children 7
acl videocache_allow_url url_regex -i \\.youtube\\.com\\/get_video\\?
acl videocache_allow_url url_regex -i \\.googlevideo\\.com\\/videoplayback \\.googlevideo\\.com\\/videoplay \\.googlevideo\\.com\\/get_video\\?
acl videocache_allow_url url_regex -i \\.google\\.com\\/videoplayback \\.google\\.com\\/videoplay \\.google\\.com\\/get_video\\?
acl videocache_allow_url url_regex -i \\.google\\.[a-z][a-z]\\/videoplayback \\.google\\.[a-z][a-z]\\/videoplay \\.google\\.[a-z][a-z]\\/get_video\\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/videoplayback\\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/videoplay\\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/get_video\\?
acl videocache_allow_url url_regex -i proxy[a-z0-9\\-][a-z0-9][a-z0-9][a-z0-9]?\\.dailymotion\\.com\\/
acl videocache_allow_url url_regex -i vid\\.akm\\.dailymotion\\.com\\/
acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\\.xtube\\.com\\/(.*)flv
acl videocache_allow_url url_regex -i bitcast\\.vimeo\\.com\\/vimeo\\/videos\\/
acl videocache_allow_url url_regex -i va\\.wrzuta\\.pl\\/wa[0-9][0-9][0-9][0-9]?
acl videocache_allow_url url_regex -i \\.files\\.youporn\\.com\\/(.*)\\/flv\\/
acl videocache_allow_url url_regex -i \\.msn\\.com\\.edgesuite\\.net\\/(.*)\\.flv
acl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\\.tube8\\.com\\/ mobile[a-z0-9]?[a-z0-9]?[a-z0-9]?\\.tube8\\.com\\/
acl videocache_allow_url url_regex -i \\.mais\\.uol\\.com\\.br\\/(.*)\\.flv
acl videocache_allow_url url_regex -i \\.video[a-z0-9]?[a-z0-9]?\\.blip\\.tv\\/(.*)\\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram)
acl videocache_allow_url url_regex -i video\\.break\\.com\\/(.*)\\.(flv|mp4)
acl videocache_allow_dom dstdomain .mccont.com dl.redtube.com .cdn.dailymotion.com
acl videocache_deny_url url_regex -i http:\\/\\/[a-z][a-z]\\.youtube\\.com http:\\/\\/www\\.youtube\\.com

url_rewrite_access deny videocache_deny_url
url_rewrite_access allow videocache_allow_url
url_rewrite_access allow videocache_allow_dom

redirector_bypass on

acl store_rewrite_list dstdomain -i "/etc/squid/thunder.lst"
url_rewrite_access allow store_rewrite_list
url_rewrite_access deny all

In this case if I have a video in cache, it's served from, but when it's not in cache, Videocache can't download it.

Please you can see my configurations? There is something wrong? I need this integration because I'm writing my post-graduated's text about Squid+videocache.

Thank you!

P.S.: Lopan is guiding me in this text!

by Júlio Henrique de Oliveira on 29 Jul 2009

Hi Kulbir,

There is something wrong in my squid configuration?

Thanks,

Júlio Henrique