Sunday, April 14, 2013

Delay Pool untuk squid di ubuntu

Konfigurasi Delay Pool untuk squid, masukkan code berikut kedalam squid.conf

 #Acl untuk membatasi extensi file tertentu
acl download url_regex -i \.avi* \.mpg* \.mpeg* \.rm$ \.iso* \.wav* \.mov* \.dat$ \.mpe$ \.mid$ \.flv* \.3gp*
acl download url_regex -i ftp \.exe* \.mp3* \.mp4* \.tar.gz$ \.gz$ \.tar.bz2$ \.rpm$ \.zip* \.rar*
acl download url_regex -i \.midi$ \.rmi$ \.wma$ \.wmv* \.ogg* \.ogm$ \.m1v$ \.mp2$ \.mpa$ \.wax$
acl download url_regex -i \.m3u$ \.asx$ \.wpl$ \.wmx$ \.dvr-ms$ \.snd$ \.au$ \.aif$ \.asf$ \.m2v$
acl download url_regex -i \.m2p$ \.ts$ \.tp$ \.trp$ \.div$ \.divx$ \.mod$ \.vob$ \.aob$ \.dts$
acl download url_regex -i \.ac3$ \.cda$ \.vro$ \.deb$ \.mkv*


#acl untuk membatasi youtube
acl streaming url_regex -i \.youtube\.com\/get_video\?
acl streaming url_regex -i \.youtube\.com\/videoplayback \.youtube\.com\/videoplay \.youtube\.com\/get_video\?
acl streaming url_regex -i \.youtube\.[a-z][a-z]\/videoplayback \.youtube\.[a-z][a-z]\/videoplay \.youtube\.[a-z][a-z]\/get_video\?

delay_pools 2

#delay pool untuk extensi file tertentu
delay_class 1 2
delay_parameters 1 -1/-1 40000/100000
delay_access 1 allow download
delay_access 1 deny all

Keterangannya delay pool pertama : ketika besar file yang didownload mencapai 100 KB. Kecepatan akan dilimit menjadi 40 KByte per second ( 320 kbit per second )

delay_class 2 2
delay_parameters 2 -1/-1 62000/60000
delay_access 2 allow streaming
delay_access 2 deny all

Keterangannya delay pool Kedua : ketika besar file yang distreaming mencapai 60 KB. Kecepatan akan dilimit menjadi 62 KBps ( 500 kbps )

No comments:

Post a Comment