baru tadi sadar, kalo youtube caching nya gak bisa?gak ada satupun yg hit. :(
coba utak atik, bisa nge cache kembali yg ada di googlevideo.com
quick workaround.

di script perl store_url_rewrite ubah jadi seperti ini:

$url =~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)&.*@squid://videos.youtube.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)$@squid://videos.youtube.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/videoplayback\?(.*)id=(.*?)$@squid://videos.google.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/videoplayback\?(.*)id=(.*?)&.*@squid://videos.google.INTERNAL/ID=$3@;

di squid.conf:

acl store_rewrite_list url_regex ^http://(.*?)/get_video\?
acl store_rewrite_list url_regex ^http://(.*?)/videoplayback\?
refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private

saya test bisa meng-cache yg ada di google video

1243017933.687 55980 172.18.1.5 TCP_HIT/200 5007160 GET http://v14.lscache7.googlevideo.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag&itag=34&ipbits=0&sver=3&expire=1243015200&key=yt1&signature=A1743BEF65E797AEF9E5B98998D45E2F7661B41F.55FDA15EF1725A1C0EA18CA9E4C88ED99465529F&id=26cccdee1f384d7b - NONE/- video/x-flv

nb: setelah di pikir2 sepertinya lebih enak pake aplikasi cachevideos, http://cachevideos.com/download. dengan sedikit modifikasi hasil caching nya bisa di share untuk squid proxy yg lain.

Share

You may also want to read these posts:

  4 Responses to “squid + caching youtube”

Comments (4)
  1. pak.. bukannya ini utk squid di windows ??

    emang kalau pakai aplikasi cachevideos…bisa utk squid window…

  2. kalau squidnya natively jalan di windows memang cachevideos nya butuh dependensi library/module yg tidak ada di python windows version.

    workaround nya saya install linux di vmware. :)

    • cachevideos?
      sewaktu saya buat tulisan ini cachevideos nggak bisa jalan di windows + ActivePerl. btw cachevideos sudah nggak free lagi.
      kalau pakai squid + perl script yang diatas memang bisa kok di windows :)

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
GeoIP
© 2011 KutuKupret Suffusion theme by Sayontan Sinha