[HELP]Cek configurasi squid

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

[HELP]Cek configurasi squid

Postby Bandi_Shippuden » 13 Jun 2013, 00:35

[help]
Mas, Tolong bantu saya, ceck configurasi squid punya saya, kayaknya banyak banget yang salah,
SQUID.CONF
Tampilkan
[font:Courier New]
#-----------------------------------------------------#
# LUSCA - High Performance Configuration #
#-----------------------------------------------------#
http_port 3128 transparent
cache_mem 32 MB
server_http11 on
icp_port 0

#===================================================================
# TAG: File Squid
#===================================================================
pid_filename /var/run/squid.pid
coredump_dir /var/spool/squid/
error_directory /usr/share/squid/errors/English
icon_directory /usr/share/squid/icons
mime_table /etc/squid/mime.conf

#===================================================================
# OPTIONS WHICH AFFECT THE CACHE SIZE / zaib
#===================================================================
# If you have 4GB memory in Squid box, we will use formula of 1/3
# You can adjust it according to your need. IF squid is taking too much of RAM
# Then decrease it to 128 MB or even less.
# ------------------------------------------------------------------#
maximum_object_size_in_memory 512 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
maximum_object_size 10 GB
cache_swap_low 98%
cache_swap_high 99%

# TAG: Cache Directory
# ------------------------------------------------------------------#
cache_dir aufs /cache1 23000 207 256
cache_dir aufs /cache2 23000 207 256
cache_dir aufs /cache3 23000 207 256
cache_dir aufs /cache4 23000 207 256
cache_dir aufs /cache5 23000 207 256
cache_dir aufs /cache6 23000 207 256
cache_dir aufs /cache7 23000 207 256
cache_dir aufs /cache8 23000 207 256
cache_dir aufs /cache9 23000 207 256

# =====================================================================
# TAG : ACL Section Default
# =====================================================================
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl network src 192.168.10.0/24 172.17.31.0/24
acl manager proto cache_object

acl SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 631 # cups
acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl connect method CONNECT
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
acl apache rep_header Server ^Apache
acl dynamic urlpath_regex cgi-bin \?

acl ads.block url_regex -i "/etc/squid/ads.block"

acl ytrange url_regex -i .*youtube.*itag=22
acl ytrange url_regex -i .*youtube.*itag=34.*range
acl ytrange url_regex -i .*youtube.*itag=35.*cpn
acl ytrange url_regex -i .*youtube.*itag=37

acl yutub url_regex -i .*youtube\.com\/.*$
acl yutub url_regex -i .*youtu\.be\/.*$

acl redirec urlpath_regex -i .*&redirect_counter=1&cms_redirect=yes
acl redirec urlpath_regex -i .*&ir=1&rr=12

acl QUERY urlpath_regex -i \.(ini|ui|lst|inf|pak|ver|patch)$
acl QUERY urlpath_regex -i (dat.asp|afs.dat|notice.swf|patchlist.txt|hackshield|captcha|reset.css|update.ver|notice.html|updates.txt|gamenotice)

# ===========================================================
# Caching Youtube and other video
# ===========================================================
acl store_rewrite_list urlpath_regex \/(watchtime\?|watch\?|get_video\?|videoplayback\?id|videoplayback.*id)
acl store_rewrite_list urlpath_regex \/(stream_204\?|player_204\?|ptracking\?|get_video\?|get_video_info\?|videodownload\?|videoplayback\?)
acl store_rewrite_list urlpath_regex \/(stream_204\?|player_204\?|ptracking\?|get_video\?|get_video_info\?|videodownload\?|videoplayback.*id)
acl store_rewrite_list urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|swf)\?
acl store_rewrite_list_url url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_url url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
acl store_rewrite_list_path urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
acl store_rewrite_list urlpath_regex -i \.flv$ \.mp3$ \.mp4$ \.swf$ \.3gp$

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\?
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 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 \.vimeo\.com\/(.*)\.(flv|mp4)
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 \.youporn\.com\/(.*)\.flv
acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv
acl videocache_allow_url url_regex -i \.tube8\.com\/(.*)\.(flv|3gp)
acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv
acl videocache_allow_url url_regex -i \.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v)
acl videocache_allow_url url_regex -i \.apniisp\.com\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v)
acl videocache_allow_url url_regex -i \.break\.com\/(.*)\.(flv|mp4)
acl videocache_allow_url url_regex -i redtube\.com\/(.*)\.flv
acl videocache_allow_dom dstdomain .mccont.com .metacafe.com .cdn.dailymotion.com
acl videocache_deny_dom dstdomain .download.youporn.com .static.blip.tv

acl store_rewrite_list_domain dstdomain .fbcdn.net .youtube.com .googlevideo.com .gstatic.com .bp.blogspot.com
acl store_rewrite_list_domain dstdomain .4shared.com .twimg.com .ytimg.com .orkut.com
acl store_rewrite_list_domain dstdomain .ggpht.com .media.tumblr.com .photobucket.com
acl store_rewrite_list_domain dstdomain .avast.com .avg.com .vimeo.com .v.mccont.com .blip.tv
acl store_rewrite_list_domain dstdomain .flashvideo.globo.com .terra.com
acl store_rewrite_list_domain dstdomain .wpc.porntube.com .redtubefiles.com .xvideos.com .phncdn.com .pornhub.com
acl store_rewrite_list_domain dstdomain .catalog.video.msn.com .mais.uol.com.br
acl store_rewrite_list_domain dstdomain .videobb.com .sourceforge.net
acl store_rewrite_list_domain dstdomain .dailymotion.com
acl store_rewrite_list_domain dstdomain .gemscool.com
acl store_rewrite_list_domain dstdomain .speedtest.cbn.net
acl store_rewrite_list_domain dstdomain .xl.co.id/XLInternet/SpeedTest
acl store_rewrite_list_domain dstdomain .speedtest.net
acl store_rewrite_list_domain dstdomain .speedtest.biznetnetworks.com
acl store_rewrite_list_domain dstdomain .speedtest.indosatm2.com
acl store_rewrite_list_domain dstdomain .speedtest.telkomspeedy.com

acl store_rewrite_list_domain_CDN url_regex (khm|mt)[0-9]?.google.com
acl store_rewrite_list_domain_CDN url_regex photos-[a-z].ak.fbcdn.net
acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]*
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*)
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$
acl store_rewrite_list_domain_CDN url_regex (khm|mt)[0-9]?.google.co(m|\.id)
acl store_rewrite_list_domain_CDN url_regex streamate.doublepimp.com.*\.js\? \.doubleclick\.net.* yieldmanager cpxinteractive quantserve\.com

# Manipulasi Speedtest
# ------------------------------------------------------------------------------#
acl speedtest_allow_url url_regex -i \.speedtest\.net\/ speedtest
acl speedtest_allow_url url_regex ^http:\/\/speedtest\.*
acl speedtest_allow_url url_regex ^http:\/\/.*speedtest.*
acl speedtest_allow_dom dstdomain .speedtest.net

acl dontrewrite url_regex -i c\.youtube\.com\/videoplayback.*redirect_counter=1.*$
acl dontrewrite url_regex -i c\.youtube\.com\/videoplayback.*cms_redirect=yes.*$
acl dontrewrite url_regex (get_video|video\?v=|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* \.php\? \.asp\? \.aspx\? threadless.*\.jpg\?r=
acl getmethod method GET

# FOR HTTP ACCESS
# -------------------------------------------------------------------------------#
http_access allow manager localhost
http_access allow purge localhost
http_access deny manager
http_access deny purge
http_access deny ads.block
http_access deny ytrange
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports
http_access allow network
http_access allow localhost
http_access deny to_localhost
http_access deny all

upgrade_http0.9 deny shoutcast
broken_vary_encoding allow apache
header_access Accept-Encoding deny all
header_access X-Forwarded-For deny all

#============================================================$
# SNMP , if you want to generate graphs for SQUID via MRTG
#============================================================$
snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic all

# TAG : GZIP ON
# -------------------------------------------------------------------#
http_gzip on
http_gzip_types text/plain,text/html,text/xml,text/css,application/xml,application/xhtml+xml,application/rss+xml,application/javascript,application/x-javascript
http_gzip_prefer_gzip on
http_gzip_prefer_deflate on
http_gzip_hash 9
http_gzip_comp_level 9
http_gzip_min_length 0
http_gzip_window 15
http_gzip_prealloc 256 KB

# FOR SOREURL ACCESS
# -------------------------------------------------------------------------------#
storeurl_access allow store_rewrite_list
storeurl_access allow store_rewrite_list_path
storeurl_access allow store_rewrite_list_url
storeurl_access allow videocache_allow_url
storeurl_access allow videocache_allow_dom
storeurl_access allow store_rewrite_list_domain
storeurl_access allow store_rewrite_list_domain_CDN
storeurl_access allow speedtest_allow_url
storeurl_access allow speedtest_allow_dom
storeurl_access deny videocache_deny_dom
storeurl_access deny dontrewrite
storeurl_access deny !getmethod
storeurl_access deny all

storeurl_rewrite_program /etc/squid/storeurl.pl
storeurl_rewrite_children 15
storeurl_rewrite_concurrency 100

# TAG: Log Squid
# --------------------------------------------------------------------------------#
# referer_log /var/log/squid/referer.log
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_log /dev/null
cache_store_log /dev/null
store_dir_select_algorithm round-robin
logfile_daemon /usr/lib/squid/logfile-daemon
logformat squid1 %{Referer}>h %ru
access_log /var/log/squid/yt.log squid1 yutub

# FOR CACHE ACCESS
# --------------------------------------------------------------------------------#
cache deny redirec
cache deny QUERY

# ============================================================================================================================
# TAG : RFRESH PETEREN
# ============================================================================================================================
refresh_pattern -i \.(sc-|dl-|ex-|mh-|mst|dll)$ 0 20% 0
refresh_pattern -i (main.exe|notice.html)$ 0 20% 0
refresh_pattern -i (livescore.com|UpdaterModifier.exe|FreeStyle.exe|FSLauncher.exe) 0 20% 0
refresh_pattern .speedtest.* 0 60% 10 negative-ttl=0

refresh_pattern imeem.*\.flv 0 0% 0 override-lastmod override-expire
refresh_pattern ^ftp: 40320 20% 40320 override-expire reload-into-ims store-stale
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (livescore.com|UpdaterModifier.exe|FreeStyle.exe|FSLauncher.exe) 0 20% 0

refresh_pattern -i \.flv$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.mp3$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.mp4$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.swf$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.gif$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.jpg$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.jpeg$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.exe$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.rar$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.zip$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.cab$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.7z$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.3gp$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.avi$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale
refresh_pattern -i \.ico$ 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth store-stale

# TAG : Video Cache
# ------------------------------------------------------------------------------------------------------------------------------
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?|mp4?) 43200 999999% 43200 ignore-no-cache ignore-no-store ignore-private override-expire override-lastmod reload-into-ims store-stale
refresh_pattern (get_video\?|videoplayback\?id|videoplayback.*id|videodownload\?|\.flv?|mp4?) 43200 999999% 43200 ignore-no-cache ignore-no-store ignore-private override-expire override-lastmod reload-into-ims store-stale
refresh_pattern ^http://[^/]+\.youtube\.com/(get_video|video|videoplayback|videodownload).*(begin|start)\=[1-9][0-9]* 0 0% 0
refresh_pattern ^http://[^/]+\.youtube\.com/(get_video\?|videoplayback\?|videodownload\?) 43200 99999999% 259200 override-expire ignore-reload ignore-must-revalidate ignore-no-cache ignore-no-store ignore-private store-stale negative-ttl=0
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|watch\?\.flv?|.vid\?) 2629742 99999999% 2629742 override-expire ignore-reload ignore-must-revalidate ignore-no-cache ignore-no-store ignore-private store-stale negative-ttl=0
refresh_pattern (\.swf\?|\.avi\?|\.mov\?|\.wm(a|v)\?|\.3gp\?|\.mp(4|3)\?|\.rm\?|\.ram\?|\.m4v\?|\.on2\?) 43200 999999% 2629742 override-expire ignore-reload ignore-must-revalidate ignore-no-cache ignore-no-store ignore-private store-stale negative-ttl=0
refresh_pattern (get_video\?|videoplayback\?|videodownload\?) 5259487 99999999% 5259487 override-expire ignore-reload ignore-private negative-ttl=0
refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload
refresh_pattern -i \.(flv|mp4)$ 10080 90% 999999 ignore-no-cache override-expire ignore-private

# TAG : Speedtest
# --------------------------------------------------------------------------------------------------------------------------------
refresh_pattern .speedtest.* 0 60% 10 negative-ttl=0
refresh_pattern speedtest.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png|swf|txt|js) 0 50% 180 store-stale negative-ttl=0

# TAG : Ads
# -------------------------------------------------------------------------------------------------------------------------------
refresh_pattern ^.*safebrowsing.*google 131400 999999% 525600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth negative-ttl=10080 store-stale
refresh_pattern ^.*(streamate.doublepimp.com.*\.js\?|utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 5259487 20% 5259487 ignore-no-cache ignore-no-store ignore-private override-expire ignore-reload ignore-auth store-stale negative-ttl=40320 max-stale=1440

# TAG : Antivirus
# -------------------------------------------------------------------------------------------------------------------------------
refresh_pattern avast.com.*\.vpx 40320 50% 525600 store-stale reload-into-ims
refresh_pattern (avgate|avira).*\.(idx|gz)$ 1440 90% 1440 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern kaspersky.*\.avc$ 131400 999999% 525600 ignore-reload store-stale
refresh_pattern kaspersky 1440 50% 131400 ignore-no-cache store-stale
refresh_pattern .symantecliveupdate.com.*\.zip 1440 90% 131400 store-stale
refresh_pattern .update.nai.com/.*\.(gem|zip|mcs) 43800 999999% 43800 ignore-reload store-stale
refresh_pattern .symantec.com.*\(exe|zip) 43800 999999% 43800 ignore-reload store-stale
refresh_pattern ^http://file.pb.gemscool.com.*\.zip 131400 999999% 131400 override-expire store-stale
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|mov|mkv|cab|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store ignore-private store-stale ignore-auth
refresh_pattern .kaskus.us.*\.(jpg|gif|png) 1440 60% 131400 override-expire store-stale

# TAG : Specific sites
# --------------------------------------------------------------------------------------------------------------------------------
refresh_pattern \.rapidshare.*\/[0-9]*\/.*\/[^\/]* 131400 90% 525600 ignore-reload store-stale
refresh_pattern ^http://v\.okezone\.com/get_video\/([a-zA-Z0-9]) 131400 999999% 43200 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod negative-ttl=10080 store-stale
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 525600 99999999% 525600 override-expire ignore-reload ignore-no-cache ignore-private store-stale negative-ttl=0
refresh_pattern \.(ico|video-stats) 525600 999999% 525600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod negative-ttl=10080 store-stale
refresh_pattern \.etology\? 525600 999999% 525600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern galleries\.video(\?|sz) 525600 999999% 525600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern brazzers\? 525600 999999% 525600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern \.adtology\? 525600 999999% 525600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.id) 131400 999999% 525600 override-expire ignore-reload store-stale ignore-private negative-ttl=10080
refresh_pattern ytimg\.com.*\.(jpg|png) 525600 999999% 525600 override-expire ignore-reload store-stale
refresh_pattern images\.friendster\.com.*\.(png|gif) 131400 999999% 525600 override-expire ignore-reload store-stale
refresh_pattern garena\.com 525600 999999% 525600 override-expire reload-into-ims store-stale
refresh_pattern photobucket.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 525600 999999% 525600 override-expire ignore-reload store-stale
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 525600 999999% 525600 ignore-no-cache override-expire override-lastmod store-stale
refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\. 131400 999999% 525600 ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http:\/\/www.onemanga.com.*\/ 525600 999999% 525600 reload-into-ims override-expire store-stale
refresh_pattern mediafire.com\/images.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 131400 999999% 525600 reload-into-ims override-expire ignore-private store-stale
refresh_pattern \.macromedia.com.*\.(z|exe|cab) 131400 999999% 525600 ignore-reload override-expire store-stale

# POINT BLANK
refresh_pattern (PointBlank.exe.zip|HSUpdate.exe.zip|PBConfig.exe.zip) 180 60% 131400
refresh_pattern -i (livescore.com|goal.com) 0 50% 60

# GAME2
refresh_pattern .gemscool.com.*\(zip) 43800 100% 43800 reload-into-ims override-expire store-stale
refresh_pattern .edgecastcdn.net.*\swf\? 43800 999999% 43800 ignore-no-cache override-expire ignore-reload ignore-must-revalidate store-stale

# TAG : Facebook
# --------------------------------------------------------------------------------------------------------------------------------
refresh_pattern ((facebook.com)|(85.131.151.39)).*\.(jpg|png|gif) 129600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern -i .facebook.com.*.(jpg|gif|png|swf|wav|mp(e?g|a|e|1|2|3|4)|3gp|flv|swf|wmv|zip|rar) 12960 999999% 129600
refresh_pattern -i .fbcdn.net.*.(jpg|gif|png|swf|wav|mp(e?g|a|e|1|2|3|4)|3gp|flv|swf|wmv|zip|rar) 12960 999999% 129690
refresh_pattern -i .zynga.com.*.(jpg|gif|png|swf|wav|mp(e?g|a|e|1|2|3|4)|3gp|flv|swf|wmv) 12960 999999% 129609
refresh_pattern -i .crowdstar.com.*.(jpg|gif|png|swf|wav|mp(e?g|a|e|1|2|3|4)|3gp|flv|swf|wmv) 12960 999999% 129609
refresh_pattern ^http://static.ak.fbcdn.net*.(jpg|gif|png|mp(e?g|a|e|1|2|3|4)|3gp|flv|swf|wmv) 129600 999999% 129600
refresh_pattern ^http://videoxl.l[0-9].facebook.com/(.*)(3gp|flv|swf|wmv|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600
refresh_pattern ^http://*.channel.facebook.com/(.*)(js|css|swf|jpg|gif|png|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600
refresh_pattern ^http://video.ak.facebook.com*.(3gp|flv|swf|wmv|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600
refresh_pattern ^http://photos-[a-z].ak.fbcdn.net/(.*)(css|swf|jpg|gif|png|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600
refresh_pattern ^http://profile.ak.fbcdn.net*.(jpg|gif|png) 129600 999999% 129600
refresh_pattern ^http://platform.ak.fbcdn.net/.* 720 100% 4320
refresh_pattern ^http://creative.ak.fbcdn.net/.* 720 100% 4320
refresh_pattern ^http://apps.facebook.com/.* 720 100% 4320
refresh_pattern ^http://static.ak.fbcdn.net*.(js|css|jpg|gif|png) 129600 999999% 129600
refresh_pattern ^http://statics.poker.static.zynga.com/(.*)(swf|jpg|gif|png|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600
refresh_pattern ^http://statics.poker.static.zynga.com/.* 720 100% 4320
refresh_pattern ^http://*.zynga.com*.(swf|jpg|gif|png|wav|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600
refresh_pattern ^http://*.crowdstar.com*.(swf|jpg|gif|png|wav|mp(e?g|a|e|1|2|3|4)) 129600 999999% 129600

# TAG : Game Facebook
# --------------------------------------------------------------------------------------------------------------------------------
refresh_pattern ^http:\/\/apps.facebook.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.zynga.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.farmville.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.ninjasaga.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.mafiawars.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.crowdstar.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.popcap.com.*\/ 10080 999999% 43200 ignore-reload ignore-no-cache ignore-no-store store-stale

# TAG : Banner IIX
# ---------------------------------------------------------------------------------------------------------------------------------
refresh_pattern ^http:\/\/openx.*\.(jp(e?g|e|2)|gif|pn[pg]|swf|ico|css|tiff?) 129600 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/openx.kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern kaskus.\us.*\.(jp(e?g|e|2)|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern -i cdn-[a-z]\.kaskus.\us.*\.(jp(e?g|e|2)|gif|png) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/img.kaskus.us.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache
refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 43200 20% 43200 ignore-no-cache ignore-private override-expire ignore-reload
refresh_pattern ^http:\/\/openx.*\.(jp(e?g|e|2)|gif|pn[pg]|swf|ico|css|tiff?) 129600 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/openx.kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern kaskus.\us.*\.(jp(e?g|e|2)|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.kaskus.us.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale

# TAG : Ytimg, Google, Etc
# --------------------------------------------------------------------------------------------------------------------------------
refresh_pattern ^.*safebrowsing.*google 43200 999999% 43200 override-expire ignore-reload ignore-no-cache ignore-private
refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.id) 43200 999999% 43200 override-expire ignore-reload ignore-private
refresh_pattern ytimg\.com.*\.jpg 43200 999999% 43200 override-expire ignore-reload
refresh_pattern ^http:\/\/www.onemanga.com.*\/ 43200 999999% 43200 reload-into-ims ignore-no-cache ignore-reload override-expire
refresh_pattern ^http://v\.okezone\.com/get_video\/([a-zA-Z0-9]) 43200 999999% 43200 override-expire ignore-reload ignore-no-cache ignore-private override-lastmod

# TAG : IIX DOWNLOAD
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale ignore-auth
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.4shared\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale ignore-auth
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.ziddu\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims ignore-reload ignore-no-cache ignore-no-store store-stale ignore-auth

# TAG : IIX DOWNLOAD
# ---------------------------------------------------------------------------------------------------------------------------------
refresh_pattern -i \.(3gp|7z|ace|asx|bin|deb|divx|dvr-ms|ram|rpm|exe|inc|cab|qt) 43200 999999% 43200 ignore-no-cache ignore-no-store reload-into-ims store-stale
refresh_pattern -i \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v)|arj|lha|lzh|zip|tar) 43200 999999% 43200 ignore-no-cache ignore-no-store reload-into-ims store-stale
refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|dat|ad|txt|dll) 43200 999999% 43200 ignore-no-cache ignore-no-store reload-into-ims store-stale
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 999999% 43200 ignore-no-cache ignore-no-store reload-into-ims store-stale
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 999999% 43200 ignore-no-cache ignore-no-store reload-into-ims store-stale

# TAG : General
# ---------------------------------------------------------------------------------------------------------------------------------
refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png) 131400 999999% 525600 ignore-no-cache ignore-no-store reload-into-ims override-expire store-stale
refresh_pattern \.(z(ip|[0-9]{2})|r(ar|[0-9]{2})|jar|bz2|gz|tar|rpm|vpu) 131400 999999% 525600 override-expire ignore-no-cache reload-into-ims
refresh_pattern \.(mp3|wav|og(g|a)|flac|midi?|rm|aac|wma|mka|ape) 131400 999999% 525600 override-expire reload-into-ims ignore-reload
refresh_pattern \.(exe|msi|dmg|bin|xpi|iso|swf|mar|psf|cab|mar) 131400 999999% 525600 override-expire reload-into-ims ignore-no-store ignore-no-cache
refresh_pattern \.(mkv|mpeg|ra?m|avi|mp(g|e|4)|mov|divx|asf|wmv|m\dv|rv|vob|asx|ogm|flv|3gp|on2) 525600 9999999% 525600 ignore-private ignore-no-cache override-expire reload-into-ims

refresh_pattern -i (cgi-bin) 0 0% 0
refresh_pattern \.(php|jsp|cgi|asx)\? 0 0% 0
refresh_pattern . 0 50% 525600 store-stale

#========================================================================================
# TAG : Tuning
#========================================================================================
redirector_bypass on
fqdncache_size 16384
ipcache_size 16384
ipcache_low 98
ipcache_high 99
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 75
shutdown_lifetime 10 seconds
memory_pools off
buffered_logs off
log_icp_queries off
logfile_rotate 1
log_fqdn off
forwarded_for off
icp_hit_stale on
query_icmp on
reload_into_ims on
emulate_httpd_log off
negative_ttl 2 minutes
pipeline_prefetch on
vary_ignore_expire on
half_closed_clients off
high_page_fault_warning 2
nonhierarchical_direct on
prefer_direct off
range_offset_limit 0 KB
strip_query_terms off
max_stale 10 years
redirect_rewrites_host_header off
cache_mgr bandi.shippuden@gmail.com
cache_effective_user proxy
cache_effective_group proxy
visible_hostname bandi
unique_hostname bandi
cachemgr_passwd none all
client_db on
max_filedescriptors 8192
n_aiops_threads 24
load_check_stopen on
load_check_stcreate on
download_fastest_client_speed on

#============================================================
# ZPH , To enable cache content to be delivered at full lan speed,
# To bypass the queue at MT.
#============================================================
tcp_outgoing_tos 0x30 network
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136

# =============================================================================================================================
# Delay Pools
# =============================================================================================================================
#acl file-file url_regex -i ftp \.ppt \.tar.gz \.tar.bz \.tar.bz2 \.gz \.rpm \.zip \.gzip \.bin \.rar \.qt \.iso \.raw \.tar \.doc \.z \.arj \.lzh \.vqf \.exe
#acl audio-audio url_regex -i \.mp3 \.mp2 \.aac \.wav \.mid \.wmv \.wma \.ogg
#acl striming url_regex -i \.mov \.avi \.mpeg \.mpe \.mpg \.ram \.rm \.flv \.flv-x \.mp4 \.3gp \.mkv
#acl striming url_regex -i get_video? video_id? videodownload? videoplayback? .c.youtube.com

#delay_pools 3

#delay_class 1 1
#delay_access 1 allow file-file
#delay_parameters 1 51200/51200

#delay_class 2 1
#delay_access 2 allow audio-audio
#delay_parameters 2 51200/51200

#delay_class 3 1
#delay_access 3 allow striming
#delay_parameters 3 51200/51200
[/font]


STOREURL.PL
Tampilkan
[font:Courier New]#!/usr/bin/perl
# ISI DARI STOREURL DIBAWAH INI GADO GADO.
# ADA YG DARI CHUDY DAN ADA YG DARI SHUDY
# SHUDYLAH BERBAGI ILMU :3
# ucok_karnadi(at)yahoo.com or https://twitter.com/syaifuddin_jw

$|=1;
while () {
@X = split;
$x = $X[0] . " ";
$_ = $X[1];
$u = $X[1];

# FOR NEW YOUTUBE CACHE
if ($X[1] =~ m/^http\:\/\/.*(youtube|google).*videoplayback.*/){
@itag = m/[&?](itag=[0-9]*)/;
@CPN = m/[&?]cpn\=([a-zA-Z0-9\-\_]*)/;
@IDS = m/[&?]id\=([a-zA-Z0-9\-\_]*)/;
$id = &GetID($CPN[0], $IDS[0]);
@range = m/[&?](range=[^\&\s]*)/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range\n";

} elsif ($X[1] =~ /youtube.*videoplayback\?/){
@itag = m/[&?](itag=[^\&\s]*)/;
@range = m/[&?](range=[^\&\s]*)/;
@cpn = m/[&?](cpn=[^\&\s]*)/;
@id = m/[&?](cpn=[^\&\s]*)/;
if (-e "/var/log/squid/@cpn"){
open FILE, "/var/log/squid/@cpn";
@id = ;
close FILE;}
print $x . "http://youtube.video.cache/@id&@itag&@range\n";

} elsif ($X[1] =~ /youtube.*(stream_204|player_204)\?/){
@v = m/[&?](v=[^\&\s]*)/;
@cpn = m/[&?](cpn=[^\&\s]*)/;
open FILE, ">/var/log/squid/@cpn";
print FILE @v;
close FILE;
print $x . $X[1] . "\n";

} elsif ($X[1] =~ /youtube.*ptracking\?/){
@video_id = m/[&?](video_id=[^\&\s]*)/;
@cpn = m/[&?](cpn=[^\&\s]*)/;
@v = substr join("", @video_id), 9;
open FILE, ">/var/log/squid/@cpn";
print FILE "v=@v";
close FILE;
print $x . $X[1] . "\n";

#facebook
} elsif (m/^http\:\/\/.*(profile|photo).*\.ak\.fbcdn\.net(\/h(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
print $x . "http://facebook.SQUIDINTERNAL" . $2 . "fb" . $5 . "\n";

#Speedtest
} elsif (m/^http\:\/\/.*\/speedtest\/(.*)\?.*/) {
print $x . "http://speedtest.SQUIDINTERNAL/speedtest/" . $1 . "\n";

#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
print $x . "http://reverbnation.com.SQUIDINTERNAL/" . "$1" . "\n";

#BLOGSPOT
} elsif (m/^http:\/\/[1-4].bp.(blogspot.com.*)/) {
print $x . "http://blog-cdn." . $1 . "\n";

#ytimg
} elsif (m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
print $x . "http://cdn.ytimg.com" . $1 . "\n";

#AVAST
} elsif (m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
print $x . "http://avast-cdn." . $1 . "\n";

#AVAST
} elsif (m/^http:\/\/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\/(iavs.*)/) {
print $x . "http://avast-cdn.avast.com/" . $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";

# 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 fix
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com)\/videoplayback\?(.*)/) {
$p_str = $2;
$tag = "";
$alg = "";
$id = "";
$range = "";
if ($p_str =~ m/(itag=[0-9]*)/){$tag = "&".$1}
if ($p_str =~ m/(algorithm=[a-z]*\-[a-z]*)/){$alg = "&".$1}
if ($p_str =~ m/(id=[a-zA-Z0-9]*)/){$id = "&".$1}
if ($p_str =~ m/(range=[0-9\-]*)/){$range = "&".$1; $range =~ s/-//; $range =~ s/range=//; }
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $tag . "&" . $alg . "&" . $id . "&" . $range . "\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/;&timestamp=[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 (($X[1] =~ /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 (($X[1] =~ /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 (($X[1] =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";

#domain/path/.*/path/filename
} elsif (($X[1] =~ /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 (($X[1] =~ /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 (($X[1] =~ /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. "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 . $X[1] . "\n";
}
}


sub GetID
{
$id = "";
use File::ReadBackwards;
my $lim = 200 ;
my $ref_log = File::ReadBackwards->new('/var/log/squid/yt.log');
while (defined($line = $ref_log->readline))
{
if ($line =~ m/.*youtube.*\/watch\?.*v=([a-zA-Z0-9\-\_]*).*\s.*id=$IDS[0].*/){
$id = $1;
last;
}
if ($line =~ m/.*youtube.*\/.*cpn=$CPN[0].*[&](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*/){
$id = $2;
last;
}
if ($line =~ m/.*youtube.*\/.*[&?](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*cpn=$CPN[0].*/){
$id = $2;
last;
}
last if --$lim close();
return $id;
}[/font]


maaf sebelumnya kalo ngerepotin atau kurang sopan.
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [HELP]Cek configurasi squid

Postby q_p » 13 Jun 2013, 02:56

Iya, itu banyak yang perlu dikoreksi, antara lain pada bagian =
  • cache_dir

    Code: Select all

    cache_dir aufs /cache1 23000 207 256
    cache_dir aufs /cache2 23000 207 256
    cache_dir aufs /cache3 23000 207 256
    cache_dir aufs /cache4 23000 207 256
    cache_dir aufs /cache5 23000 207 256
    cache_dir aufs /cache6 23000 207 256
    cache_dir aufs /cache7 23000 207 256
    cache_dir aufs /cache8 23000 207 256
    cache_dir aufs /cache9 23000 207 256
    Penentuan L1 dan L2 bisa merujuk di sini.. Pertimbangkan juga volume fisik RAM yang tersedia.
  • Jumlah-nya sampai 9, sisakan satu saja jika hanya satu hdd yang tersedia. Itupun dengan volume maksimal 15000. Sehingga menjadi

    Code: Select all

    cache_dir aufs /cache1 15000 32 256
  • Tentang ACL, bisa anda pelajari di sini.
  • acl yang di bawah ini, tdk diperlukan lagi

    Code: Select all

    acl ytrange url_regex -i .*youtube.*itag=22
    acl ytrange url_regex -i .*youtube.*itag=34.*range
    acl ytrange url_regex -i .*youtube.*itag=35.*cpn
    acl ytrange url_regex -i .*youtube.*itag=37
  • stureurl-nya gunakan yang terbaru saja, release 54.
Sementara itu dulu :)
cmiiw

##PS
Sebaiknya anda baca2 dulu, banyak kok contoh-nya di sini.
User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

Re: [HELP]Cek configurasi squid

Postby Bandi_Shippuden » 18 Jun 2013, 09:39

Makasih mas saranya saya baca2 dulu ...

stureurl-nya gunakan yang terbaru saja, release 54.


storepl release 54 yg mana ya mas ??? maaf masih nubie banget ...
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [HELP]Cek configurasi squid

Postby q_p » 18 Jun 2013, 16:25

[quote=bandi16]Makasih mas saranya saya baca2 dulu ...

stureurl-nya gunakan yang terbaru saja, release 54.


storepl release 54 yg mana ya mas ??? maaf masih nubie banget ...


Bisa anda cek di sini =
https://code.google.com/p/tempat-sampah/source/list