(SHARE) MENGATASI ERROR BUKA YOUTUBE
-
storeurl.pl asli om cuddy diatas, yang di babar oleh om @abnisrea itu kalo untuk yutube2 yg banyak isinya daun2 muda sangat tepat. alias, muantap..
salah satunya ini yang om suka : http://www.youtube.com/watch?v=MZuL4w9Tcd0 soalnya daun muda semua.. ;D ;D -
"BAD NEWS:
Some research update (Someone please confirm and post your comments)
YOUTUBE has split its videos into segments of 1.5 Mb each which is the approximation of the 51 seconds. I am sure YOUTUBE have taken this step to prevent people from caching entire videos. If you have a video which is 100 Mb large, it will be split into about 55-60 segments.
As of right now, storeurl.pl wont be able to cache it. Currently VIDEOCACHE plugin is doing full cache of youtube but at higher $$$ cost"http://aacable.wordpress.com/2012/01/30/youtube-caching-problem-an-error-occured-please-try-again-later-solved/
-
Apart from the renewal of the study (due to the test capabilities of the researcher, and test tools are used)
A fact that I experienced and probably a lot of people also experience it, until this moment, I do not experience problems related to the cache youtube. During this youtube cache on my machine was not by any limit, except for a few seconds delay until full cache quotas are met.
In reply link on youtube there is an example file that has an error, then I try to open up and the results are no problems at all, runs smoothly and cache hit can run very well.
Some constraints on the cache limit was that I think it could be due to a problem that is not appropriate rules, and some other settings to be adjusted again, and it depends on the configuration of the network owner.
It would be too early if we are too quick to conclude that the error was caused because youtube cache error storeurl.plBAHASA INDONESIANYA GINI:
Terlepas dari pembaharuan penelitian orang (karena perlu di uji kapabilitas si peneliti, dan alat-alat uji yang digunakannya)
Sebuah kenyataan yang saya alami dan mungkin banyak orang juga mengalaminya, sampai detik ini, saya tidak mengalami kendala yang berkaitan dengan cache youtube. Selama ini cache youtube di mesin saya tidak pernah ter limit oleh apapun, kecuali adanya delay beberapa detik saja sampai dengan full quota cache terpenuhi.
Dalam link yg di atas ada sebuah contoh file youtube yang mengalami error, kemudian saya coba membuka dan hasilnya tidak ada kendala sedikitpun, berjalan lancar dan cache hit bisa berjalan sangat baik.
Kendala beberapa orang mengenai cache yang ter limit itu menurut saya bisa juga dikarenakan masalah rules yang tidak tepat, dan beberapa settingan lain yang harus disesuaikan lagi, dan it tergantung dari konfigurasi pemilik jaringan.
Akan sangat terlalu dini kalo kita terlalu cepat mengambil kesimpulan bahwa kesalahan cache youtube itu disebabkan karena kesalahan di storeurl.pl -
tujuan dibuatnya sebuah forum adalah untuk pembelajaran dan saling berbagi
pertama daftar di pfsense mo install az binun tp kalo ada kemauan tentunya pasti ada kemajuan
setiap topologi yg dimiliki seseorang tentunya ada perbedaan ketertarikan apakah utk game,browsing etc
dan tentunya yg lebih spesifik mungkin lebih mudah untuk mengaturnya….........cilakanya yg gado-gado kaya warnet biasa donlot,youtube,browsing etc nahh ini yg susah semua rebutan yaa emang ada pengaturan bandwidth ada proxy tapi semua ada batas kemampuanya punya 1 Mb warnet client 20 semua pengen kenceng yaa???
makanya di tunning lagi untuk sedikit mengatasi kekurangan tersebut
mari saling tukar pikiran......................mudah"an beberaha hari kedepan punya ane layak diperliatkan dan tolong kl ada yg salah dibetulin rame", saat ini rada repot hujan+petir dah 2 radio yg kena jd mesti konekin lagi jaringan (AP utama kena)
seperti biasa.....................colek mie ip ayam rong ;D -
sepertinya firewall di pf201 juga berubah :)
-
pepatah mengatakan, "sekali berdayung dua tiga pulau terlampaui" masalah error youtube sudah tuntas di perbaiki/di koreksi oleh para sesepuh saya rasa, alangkah baik nya jika masalah hit youtube yang lambat atau dikit" juga kita tuntaskan disini, toh masih dalam kategori youtube juga, maksudnya supaya jgn ada pertanyaan lagi seperti "kenapa hit youtube kok ngak cepat…??" dari para generasi PFSI yang baru masuk, termasuk saya ini yang benar-benar buta akan masalah server dan tidak mengerti dalam bahasa scrip atau alogaritma seperti yg di katakan @detrackmx , apakah ada faktor penyebab seperti hardisk yang dipakai cuma 1 buah (system dan cache bercampur) atau karena LAN card yang di pakai yang harga 65 rebuan makanya jadi lamban hit nya?
-
Youtube jadi susah di cache sekarang, dah pake seting sana sini, masih eror, malah balik lagi dr awal klu di play, sampai saat ini blum nemu setingan yang bener2 jalan, untuk sementara terpaksa deh youtube di bypass dulu, drpada error terus,
Mungkin senior2 punya jurus ampuh buat caching youtubenya bisa d share di sini
-
Youtube jadi susah di cache sekarang, dah pake seting sana sini, masih eror, malah balik lagi dr awal klu di play, sampai saat ini blum nemu setingan yang bener2 jalan, untuk sementara terpaksa deh youtube di bypass dulu, drpada error terus,
Mungkin senior2 punya jurus ampuh buat caching youtubenya bisa d share di sini
Sebenarnya cara yang sudah dishare diatas masih cukup ampuh kok untuk meng caching youtube dan mengatasi error serta galatnya, apabila ada beberapa rekan yang trafik lannya ga secepat yang diharapkan (larinya cuman 4-6 mb) sebenarnya tinggal diutak atik dikit tuh setting trafik shapingnya.
-
om ikutan sharing yah ..
sampe sekarang ini om masih pake storeurl.pl yg default dr om chuddy
sampe sekarang ini belum ada keluhan yg mengganggu di sisi end user untuk peryoutubean
sampe sekarang ini belum menggunakan shaping/limit yg sptnya menambah oprekan lg utk peryoutubean
sampe sekarang ini hanya bermain di pattern yg diturunkan agresifitasnya gantinya nambah disk yg cepat
sampe sekarang ini belum ngerti dengan syntax perl2 an, jadi om serahkan ke yg berwajib saja :D
sampe sekarang ini sudah cukup puas dengan hasil berikut, pelan2 saja :TOTALS ICP : 120239 Queries, 22893 Hits ( 19%) HTTP: 119566 Requests, 22562 Hits ( 19%)
om pernah coba kreasi anak negeri (dr forum sebelah), om appresiasi dengan oprekannya …
kurang sreg saja, selain dari penyampaiannya
juga ada error yg mengganggu di lognya seprti ini :
2012/05/18 12:38:28| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''
2012/05/18 12:38:43| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''
2012/05/18 12:39:02| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''
2012/05/18 12:39:20| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''
2012/05/18 12:55:20| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''
2012/05/18 12:59:14| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''
2012/05/18 13:02:16| helperHandleRead: unexpected reply on channel -1 from store_rewriter #1 ''silakan mengambil jalan mana saja
seperti pepatah,
banyak jalan menuju roma
tak ada gading yg tak retak
malu bertanya, sesat di jalan (tp sekarang udah bisa GPS an kok :D) -
Spek pf 2.0 release amd64
ram 8gb
Intel(R) Xeon(R) CPU 3065 @ 2.33GHz
hdd : system 80gb sata
cache0 SAS 136gb
cache1 SAS 136gb
storeurl pk default
cuma edit dir.conf buat hdd, squid.inc dari squid.conf menjadi squid.conf.def, yang lain masih bawaan om chudy, ga di oprek2, untuk bw management pake mikrotik, kira2 ada masalah di mana ya si youtube nya ??? -
malu bertanya, sesat di jalan (tp sekarang udah bisa GPS an kok :D)
parah dong bapaku … GPS an dosa wakak.. -
Sorry Om, Numpang pasang Screenshot, barangkali ada gunanya.
(bisa di lihat kalo sudah login pfsense )![log squid access.JPG](/public/imported_attachments/1/log squid access.JPG)
![log squid access.JPG_thumb](/public/imported_attachments/1/log squid access.JPG_thumb)
![test dnssec.JPG](/public/imported_attachments/1/test dnssec.JPG)
![test dnssec.JPG_thumb](/public/imported_attachments/1/test dnssec.JPG_thumb) -
ngebut…
-
Ane coba internet explorer normal kagak ada error kemudian pake mozilla firefox terkadang nongol error "An Errore Accurred Please try again" klo versi indonesianya ” Galat Gagal Loading, Coba Ulang Lagi”.
kira kira …. ? ? ?
Adakah yang berfikir Permasalah "An Errore Accurred Please try again" bisa dikarenakan terjadi di firefox ( browser ) bukan hanya karena storeurl perl proxy….. ????.Penasaran, googling dulu, akhirnya sampai nemuin solution seperti ini.
Ane kasih kredit buat http://abyfine.com
Sebelum otak atik storeurl.pl bisa mencoba trik dibawah ini dulu.1. Buka mozilla firefox di address bar ketikkan : about:config . Kemudian Enter.
2. Cari tulisan network.http.max-persistent-connections-per-proxy rubah nilainya menjadi 0
3. Cari tulisan network.http.proxy.pipelining rubah menjadi false
4. Tutup mozillanya, lalu jalankan kembali, semoga An Errore Accurred Please try again menghilang tak terberbekas -
case closed …
setuju ?
;D::Joke=ON::
-
Ane coba internet explorer normal kagak ada error kemudian pake mozilla firefox terkadang nongol error "An Errore Accurred Please try again" klo versi indonesianya ” Galat Gagal Loading, Coba Ulang Lagi”.
kira kira …. ? ? ?
Adakah yang berfikir Permasalah "An Errore Accurred Please try again" bisa dikarenakan terjadi di firefox ( browser ) bukan hanya karena storeurl perl proxy….. ????.Penasaran, googling dulu, akhirnya sampai nemuin solution seperti ini.
Ane kasih kredit buat http://abyfine.com
Sebelum otak atik storeurl.pl bisa mencoba trik dibawah ini dulu.1. Buka mozilla firefox di address bar ketikkan : about:config . Kemudian Enter.
2. Cari tulisan network.http.max-persistent-connections-per-proxy rubah nilainya menjadi 0
3. Cari tulisan network.http.proxy.pipelining rubah menjadi false
4. Tutup mozillanya, lalu jalankan kembali, semoga An Errore Accurred Please try again menghilang tak terberbekasane punya masalah yang sama, ane coba cara bro ardy_2006 (maksudnya cara paling simple tuk newbie spt saya yang NOL di sever/script) tapi ga mempan juga. spek ane masih default blom otak-atik storeurl.pl atau squid.conf, pfsense 201 cuma install luscha cudy,lightsquid, dns forwarder bawaan, havp anti virus (mau pke squid guar ribet tuk newbie nanti aj ;D). smua servicer berjalan normal, proxy juga normal, ya itu cuma youtube aj, mau coba cara om kaptenhook neh kayannya makyoss…wkwkwk thanks all
bravo PFSI ;D ;)oh iya ane pake IE 6.0 sp3 juga firefox 3.6.17 ni video sama eror juga http://www.youtube.com/watch?v=jKOjcqoZRRs
-
lusca-cache gak pernah diupdate lagi… apakah ada gantinya? ???
-
Om justru lebih ??? ??? ???
if it aint broke, don't fix it
-
ada yg sudah pake squid3?
tempo hari lusca-cache saya gak bisa caching youtube lagi, pas mo diupdate, eh salah klik… jebol dah squid dan firewallnya... ;D
skrg lagi direbuilt ulang pake hardware yg lebih mumpuni. -
pake squid 2.7.9 stable… youtube masih TCP_MISS aja, tapi streaming gak error.
nyoba di link youtube ini http://www.youtube.com/watch?v=q-Sktgm0aD8
ada saran?squid.conf
# Do not edit manually ! http_port 172.16.1.254:3128 http_port 127.0.0.1:3128 transparent icp_port 0 pid_filename /var/run/squid.pid cache_effective_user proxy cache_effective_group proxy error_directory /usr/local/etc/squid/errors/English icon_directory /usr/local/etc/squid/icons visible_hostname firewall2.xxx.co.id cache_mgr admin@xxx.co.id access_log /var/squid/logs/access.log cache_log /var/squid/logs/cache.log cache_store_log none logfile_rotate 7 shutdown_lifetime 3 seconds # Allow local network(s) on interface(s) acl localnet src 172.16.0.0/255.255.0.0 httpd_suppress_version_string on uri_whitespace strip cache_mem 512 MB maximum_object_size_in_memory 32 KB memory_replacement_policy heap GDSF cache_replacement_policy heap LFUDA cache_dir ufs /var/squid/cache 40000 16 256 minimum_object_size 32 KB maximum_object_size 204800 KB offline_mode on cache_swap_low 90 cache_swap_high 95 acl donotcache dstdomain "/var/squid/acl/donotcache.acl" cache deny donotcache # No redirector configured # Setup some default acls acl all src 0.0.0.0/0.0.0.0 acl localhost src 127.0.0.1/255.255.255.255 acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 8080 3128 1025-65535 acl sslports port 443 563 8080 acl manager proto cache_object acl purge method PURGE acl connect method CONNECT acl dynamic urlpath_regex cgi-bin \? cache deny dynamic http_access allow manager localhost # Allow external cache managers acl ext_manager_1 src 127.0.0.1 http_access allow manager ext_manager_1 acl ext_manager_2 src 172.16.1.254 http_access allow manager ext_manager_2 http_access deny manager http_access allow purge localhost http_access deny purge http_access deny !safeports http_access deny CONNECT !sslports # Always allow localhost connections http_access allow localhost quick_abort_min 0 KB quick_abort_max 0 KB request_body_max_size 0 KB reply_body_max_size 0 deny all delay_pools 1 delay_class 1 2 delay_parameters 1 -1/-1 -1/-1 delay_initial_bucket_level 100 # Throttle extensions matched in the url acl throttle_exts urlpath_regex -i "/var/squid/acl/throttle_exts.acl" delay_access 1 allow throttle_exts delay_access 1 deny all # Custom options cache_dir ufs /cache0/squid 65000 16 256 cache_dir ufs /cache1/squid 65000 16 256 zph_mode tos zph_local 0x04 zph_parent 0 zph_option 136 acl videocache_allow_url url_regex -i \.youtube\.com\/get_video\? acl videocache_allow_url url_regex -i \.youtube\.com\/videoplayback \.youtube\.com\/videoplay \.youtube\.com\/get_video\? acl videocache_allow_url url_regex -i \.youtube\.[a-z][a-z]\/videoplayback \.youtube\.[a-z][a-z]\/videoplay \.youtube\.[a-z][a-z]\/get_video\? storeurl_access allow videocache_allow_url storeurl_access deny all storeurl_rewrite_program /usr/local/etc/squid/storeurl.pl storeurl_rewrite_children 7 storeurl_rewrite_concurrency 10 refresh_pattern -i \.(cab|3gp|swf|mp4|mp3|mkv|rm|rmvb|avi|mpeg|mpg|flv)$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth refresh_pattern -i \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico)(\?|$) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth refresh_pattern -i \.(exe|zip|rar|tgz|msi|rpm|deb|tbz|sis|xpi|bin|jar)(\?|$) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth refresh_pattern -i (get_video\?|videoplayback\?|videodownload\?|\.flv?) 10080 80% 10080 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth # Setup allowed acls # Allow local network(s) on interface(s) http_access allow localnet # Default block all to be sure http_access deny all
storeurl.pl
#!/usr/bin/perl # $Rev$ # by chudy_fernandez@yahoo.com # rev by ucok_karnadi@yahoo.com # rev date 02/04/2012 # visit my facebook account http://www.facebook.com/stressss $|=1; while (<>) { @X = split; # $X[1] =~ s/&sig=.*//; $x = $X[0] . " "; $_ = $X[1]; $u = $X[1]; #photos-X.ak.fbcdn.net where X a-z if (m/^http:\/\/photos-[a-z]?(.ak.fbcdn.net.*)/) { print $x . "http://photos" . $1 . "\n"; # photo } elsif (m/^http:\/\/photos-ash[1-5]?(.fbcdn.net.*)/) { print $x . "http://ash.photos" . $1 . "\n"; #photos.ak.fbcdn.net where X i(0-9) #a5.sphotos.ak.fbcdn.ne } elsif (m/^http:\/\/[a-z][0-9]?.(sphotos.ak.fbcdn.net.*)/) { print $x . "http://cdn.photos" . $1 . "\n"; #BLOGSPOT } elsif (m/^http:\/\/[1-4].bp.(blogspot.com.*)/) { print $x . "http://blog-cdn." . $1 . "\n"; #AVAST } elsif (m/^http:\/\/download[0-9]{3}.(avast.com.*)/) { print $x . "http://avast-cdn." . $1 . "\n"; #KAV } elsif (m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) { print $x . "http://kav-cdn." . $1 . "\n"; #AVG } elsif (m/^http:\/\/update.avg.com/) { print $x . "http://avg-cdn." . $1 . "\n"; #maps.google.com } elsif (m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) { print $x . "http://" . $1 . $2 . "\n"; #gstatic and/or wikimapia } elsif (m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) { print $x . "http://" . $1 . $2 . "\n"; #maps.google.com } elsif (m/^http:\/\/(khm|mt)[0-9]?(.google.com.*)/) { print $x . "http://" . $1 . $2 . "\n"; #ini untuk cache partial } elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(id=[a-zA-Z0-9]*).*?\&(range=[0-9]*).*/) { print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $2 . $3 . "\n"; # compatibility for old cached get_video?video_id } elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(videoplayback\?id=.*?|video_id=.*?)\&(.*?)/) { $z = $2; $z =~ s/video_id=/get_video?video_id=/; print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $z . "\n"; # youtube All itag (semua resolusi) } elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(itag=[0-9]*).*?\&(id=[a-zA-Z0-9]*).*/) { print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $2 . "&" . $3 . "\n"; # youtube All itag (semua resolusi) posisi kebalikan } elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(id=[a-zA-Z0-9]*).*?\&(itag=[0-9]*).*/) { print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $3 . "&" . $2 . "\n"; #Google } elsif (m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) { print $x . "http://www.google-analytics.com/__utm.gif\n"; #Cache High Latency Ads } elsif (m/^http:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|\.googlesyndication\.com|yieldmanager|cpxinteractive)(.*)/) { $y = $3;$z = $2; for ($y) { s/pixel;.*/pixel/; s/activity;.*/activity/; s/(imgad[^&]*).*/\1/; s/;ord=[?0-9]*//; s/;×tamp=[0-9]*//; s/[&?]correlator=[0-9]*//; s/&cookie=[^&]*//; s/&ga_hid=[^&]*//; s/&ga_vid=[^&]*//; s/&ga_sid=[^&]*//; # s/&prev_slotnames=[^&]*// # s/&u_his=[^&]*//; s/&dt=[^&]*//; s/&dtd=[^&]*//; s/&lmt=[^&]*//; s/(&alternate_ad_url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/(&url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/(&ref=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/(&cookie=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/[;&?]ord=[?0-9]*//; s/[;&]mpvid=[^&;]*//; s/&xpc=[^&]*//; # yieldmanager s/\?clickTag=[^&]*//; s/&u=[^&]*//; s/&slotname=[^&]*//; s/&page_slots=[^&]*//; } print $x . "http://" . $1 . $2 . $y . "\n"; #cache high latency ads } elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) { print $x . "http://" . $1 . "/" . $2 . "\n"; } elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) { print $x . "http://" . $1 . "\n"; #cdn, varialble 1st path } elsif (($u =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) { @y = ($1,$2,$4,$5); $y[0] =~ s/[a-z0-9]{2,5}/cdn./; print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n"; #rapidshare } elsif (($u =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) { print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "\n"; } elsif (($u =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) { print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n"; #domain/path/.*/path/filename } elsif (($u =~ /fucktube/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?[^\/]*\/[^\/]*)\/(.*)\/([^\/]*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) { @y = ($1,$2,$4,$5,$6); $y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/; print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "/" . $y[3] . "." . $y[4] . "\n"; #like porn hub variables url and center part of the path, filename etention 3 or 4 with or without ? at the end } elsif (($u =~ /tube8|pornhub|xvideos/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) { print $x . "http://cdn." . $4 . $6 . "\n"; #for yimg.com video } elsif (m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) { print $x . "http://cdn.yimg.com/" . $3 . "\n"; #for yimg.com doubled } elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) { print $x . "http://cdn.yimg.com/" . $3 . "\n"; #for yimg.com with &sig= } elsif (m/^http:\/\/([^\.]*)\.yimg\.com\/(.*)/) { @y = ($1,$2); $y[0] =~ s/[a-z]+([0-9]+)?/cdn/; $y[1] =~ s/&sig=.*//; print $x . "http://" . $y[0] . ".yimg.com/" . $y[1] . "\n"; #youjizz. We use only domain and filename } elsif (($u =~ /media[0-9]{1,5}\.youjizz/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?\.[^\/]*)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) { @y = ($1,$2,$4,$5); $y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/; print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n"; #general purpose for cdn servers. add above your specific servers. } elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) { print $x . "http://squid-cdn-url/" . $2 . "." . $3 . "\n"; # spicific extention # } elsif (m/^http:\/\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|swf).*?/) { # @y = ($1,$2); # $y[0] =~ s/((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/; # print $x . "http://" . $y[0] . "." . $y[1] . "\n"; #generic http://variable.domain.com/path/filename."ex", "ext" or "exte" #http://cdn1-28.projectplaylist.com #http://s1sdlod041.bcst.cdn.s1s.yimg.com } elsif (m/^http:\/\/(.*?)(\.[^\.\-]*?\..*?)\/([^\?\&\=]*)\.([\w\d]{2,4})\??.*$/) { @y = ($1,$2,$3,$4); $y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/; print $x . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n"; # all that ends with ; } elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) { print $x . "http://" . $1 . "/" . $2 . "\n"; } else { print $x . $_ . "\n"; } }
TCP_MISS dari access.log
1339577973.912 194 172.16.1.74 TCP_MISS/204 571 GET http://s.youtube.com/s? - DIRECT/173.194.38.135 text/html 1339577975.094 5739 172.16.1.74 TCP_MISS/200 1782224 GET http://o-o.preferred.matrix-cgk1.v14.lscache3.c.youtube.com/videoplayback? - DIRECT/119.110.118.13 video/x-flv