Setting Squid

source : tamampapua

paste di etc-inid.d name : squid

#! /bin/sh
#
# squid Startup script for the SQUID HTTP proxy-cache.
#
# Version: @(#)squid.rc 2.20 01-Oct-2001 miquels@cistron.nl
#
### BEGIN INIT INFO
# Provides: squid
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Squid HTTP Proxy
### END INIT INFO

NAME=squid
DAEMON=/usr/sbin/squid
LIB=/usr/lib/squid
PIDFILE=/var/run/$NAME.pid
SQUID_ARGS=”-D -YC”

[ ! -f /etc/default/squid ] || . /etc/default/squid

. /lib/lsb/init-functions

PATH=/bin:/usr/bin:/sbin:/usr/sbin

[ -x $DAEMON ] || exit 0

grepconf () {
w=” ” # space tab
sq=/etc/squid/squid.conf
# sed is cool.
res=`sed -ne ‘
s/^’$1′[‘”$w”‘]\+\([^'”$w”‘]\+\).*$/\1/p;
t end;
d;
:end q’ < $sq`
[ -n "$res" ] || res=$2
echo "$res"
}

grepconf2 () {
w=" " # space tab
sq=/etc/squid/$NAME.conf
# sed is cool.
res=`sed -ne '
s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
t end;
d;
:end q' /proc/sys/fs/file-max
fi
ulimit -n $SQUID_MAXFD
}

start () {
cdr=`grepconf2 cache_dir /var/spool/$NAME`
ctp=`grepconf cache_dir ufs`

case “$cdr” in
[0-9]*)
log_failure_msg “squid: squid.conf contains 2.2.5 syntax – not starting!”
log_end_msg 1
exit 1
;;
esac

#
# Create spool dirs if they don’t exist.
#
if [ -d “$cdr” -a ! -d “$cdr/00” ] || [ “$ctp” = “coss” -a ! -w “$cdr” ]
then
log_warning_msg “Creating squid cache structure”
$DAEMON $SQUID_ARGS -z
fi

if [ “$CHUID” = “” ]; then
CHUID=root
fi

#maxfds
ulimit -n 8192
umask 027
start-stop-daemon –quiet –start \
–pidfile $PIDFILE \
–chuid $CHUID \
–exec $DAEMON — $SQUID_ARGS /dev/null`
start-stop-daemon –stop –quiet –pidfile $PIDFILE –name squid
#
# Now we have to wait until squid has _really_ stopped.
#
sleep 2
if test -n “$PID” && kill -0 $PID 2>/dev/null
then
log_action_begin_msg ” Waiting”
cnt=0
while kill -0 $PID 2>/dev/null
do
cnt=`expr $cnt + 1`
if [ $cnt -gt 24 ]
then
log_action_end_msg 1
return 1
fi
sleep 5
log_action_cont_msg “”
done
log_action_end_msg 0
return 0
else
return 0
fi
}

case “$1” in
start)
log_daemon_msg “Starting Squid HTTP proxy” “squid”
if start ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
stop)
log_daemon_msg “Stopping Squid HTTP proxy” “squid”
if stop ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
reload|force-reload)
log_action_msg “Reloading Squid configuration files”
$DAEMON -k reconfigure
log_action_end_msg 0
;;
restart)
log_daemon_msg “Restarting Squid HTTP proxy” “squid”
stop
if start ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
status)
status_of_proc -p “$PIDFILE” “$DAEMON” squid && exit 0 || exit $?
;;
*)
echo “Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}”
exit 3
;;
esac

exit 0

paste di etc name : sysctl.conf

##############################################
# ApisTECH IT Develpment
# location : /etc/
# filename : sysctl.conf
# config date : 19 Juni 2010
##############################################

kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.randomize_va_space = 1
kernel.shmall = 268435456
kernel.shmmax = 268435456
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.core.optmem_max = 57344
net.ipv4.ipfrag_high_thresh = 512000
net.ipv4.ipfrag_low_thresh = 446464
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.log_martians = 0
net.ipv4.conf.default.log_martians = 0
net.ipv4.conf.all.bootp_relay = 0
net.ipv4.conf.all.proxy_arp = 0
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_max_orphans = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_dsack = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_window_scaling = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.route.flush = 1
vm.swappiness = 15

paste di etc-squid

name : storeurl.pl

#!/usr/bin/perl
# $Rev$
# by editan
# rev editan
# rev date 12.12.2012-2015

$|=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\.akahmaid\.statics\.static\.poker\.static\.zynga.*)/) {
print $x . “http://photos&#8221; . $1 . “\n”;

# photo
} elsif (m/^http:\/\/chanel\.profile-[1-4].facebook\.photos-ash[1-5]?(.fbcdn.net.*)/) {
print $x . “http://ash.photos&#8221; . $1 . “\n”;

#photos.ak.fbcdn.net where X i(0-9)
#a5.sphotos.ak.fbcdn.net
} elsif (m/^http:\/\/[a-z][0-9]?.(external.\sphotos\.ak\.fbcdn.net.*)/) {
print $x . “http://cdn\.api\.twitter\.photos” . $1 . “\n”;

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

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

#KAV
} elsif (m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
print $x . “http://kav-cdn.&#8221; . $1 . “\n”;

#AVG
} elsif (m/^http:\/\/update.avg.com/) {
print $x . “http://avg-cdn.&#8221; . $1 . “\n”;

#maps.google.com
} elsif (m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
print $x . “http://&#8221; . $1 . $2 . “\n”;

#gstatic and/or wikimapia
} elsif (m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
print $x . “http://&#8221; . $1 . $2 . “\n”;

#maps.google.com
} elsif (m/^http:\/\/(khm|mt)[0-9]?(.google.com.*)/) {
print $x . “http://&#8221; . $1 . $2 . “\n”;

#cache partial video
} 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/&#8221; . $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/&#8221; . $z . “\n”;

# video chache
} 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/&#8221; . $2 . “&” . $3 . “\n”;

# video chace balik
} 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/&#8221; . $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/;&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://&#8221; . $1 . $2 . $y . “\n”;

## Coba tambahkan Bing iE
}elsif ($url =~ m@^http://([^\.]*\.)?bing\.[^\/]*/[^?]*\?.*@i) {
# Replace any previous safe directives
$url =~ s@(adlt=[^&]*&?)@@ig;

# Add safe search directive
$url .= ‘&adlt=strict&cc=au’;

} elsif ($url =~ m@^http://([^\.]*\.)?google\.[^\/]*/[^?]*\?.*@i) {

# Replace any previous safe directives
$url =~ s@(safe=[^&]*&?)@@ig;

# Add safe search directive
$url .= ‘&safe=active’;

}elsif (m/kh(.*?)\.google\.com(.*?)\/(.*?) /) {
print “http://keyhole-srv.google.com&#8221; . $2 . “.SQUIDINTERNAL/” . $3 . “\n”;
# print STDERR “KEYHOLE\n”;
} elsif (m/mt(.*?)\.google\.com(.*?)\/(.*?) /) {
print “http://map-srv.google.com&#8221; . $2 . “.SQUIDINTERNAL/” . $3 . “\n”;
# print STDERR “MAPSRV\n”;

## last try error
#cache high latency ads
} elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . “http://&#8221; . $1 . “/” . $2 . “\n”;

# spicific servers starts here….
} elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . “http://&#8221; . $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://&#8221; . $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.&#8221; . $3 . “/SQUIDINTERNAL/” . $5 . “\n”;

} elsif (($u =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . “http://&#8221; . $1 . “/SQUIDINTERNAL/” . $3 . “\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]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
print $x . “http://cdn.&#8221; . $3 . $5 . “\n”;
#…spicific servers end here.

#photos-X.ak.fbcdn.net where X a-z
} elsif (m/^http:\/\/photos-[a-z].ak.fbcdn.net\/(.*)/) {
print $x . “http://photos.ak.fbcdn.net/&#8221; . $1 . “\n”;

#general purpose for cdn servers. add above your specific servers.
} elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
print $x . “http://squid-cdn-url//&#8221; . $2 . “.” . $3 . “\n”;

#for yimg.com doubled
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
print $x . “http://cdn.yimg.com/&#8221; . $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://&#8221; . $y[0] . “.yimg.com/” . $y[1] . “\n”;

#generic http://variable.domain.com/path/filename.”ext&#8221; or “exte” with or withour “?”
} elsif (m/^http:\/\/(.*)([^\.\-]*?\..*?)\/(.*)\.([^\/\?\&]{3,4})(\?.*)?$/) {
@y = ($1,$2,$3,$4);
$y[0] =~ s/(([a-zA-A-]+[0-9-]+)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . “http://&#8221; . $y[0] . $y[1] . “/” . $y[2] . “.” . $y[3] . “\n”;

# generic http://variable.domain.com/&#8230;
} elsif (m/^http:\/\/(([A-Za-z]+[0-9-]+)*?|.*cdn.*|.*cache.*)\.(.*?)\.(.*?)\/(.*)$/) {
print $x . “http://cdn.&#8221; . $3 . “.” . $4 . “/” . $5 . “\n”;

# spicific extention that ends with ?
} elsif (m/^http:\/\/(.*?)\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|on2)\?(.*)/) {
print $x . “http://&#8221; . $1 . “/” . $2 . “.” . $3 . “\n”;

# all that ends with ;
} elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . “http://&#8221; . $1 . “/” . $2 . “\n”;

} else {
print $x . $_ . “\n”;
}
}

name : squid.conf.pl

#—————————————————–#
## PROXY FMI – High Performance Configuration
## —————————————————#
## Support : http://tamampapua.wordpress.com
## Updated : 02/09/2011
#—————————————————–#

##start of config
http_port 3128 transparent
icp_port 0

pid_filename /var/run/squid.pid
cache_effective_user proxy
cache_effective_group proxy
error_directory /usr/share/squid/errors/templates
icon_directory /usr/share/squid/icons
visible_hostname NAMA BISNIS ANDA
cache_mgr admin@NAMA BISNIS ANDA
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
logfile_rotate 4
shutdown_lifetime 10 seconds

#SESUAIKAN DENGAN IP NETWORK LAN ANDA
acl localnet src 192.168.1.0/24

uri_whitespace strip
dns_nameservers 192.168.11.1

cache_mem 8 MB
maximum_object_size_in_memory 128 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

#SESUAIKAN DENGAN BESARAN PARTISI CACHE ANDA
cache_dir aufs /cache1 100000 64 256
cache_dir aufs /cache2 100000 64 256
cache_dir aufs /cache3 100000 64 256
cache_dir aufs /cache4 100000 64 256
cache_dir aufs /cache5 100000 64 256

minimum_object_size 512 bytes
maximum_object_size 128000 KB
offline_mode off
cache_swap_low 98
cache_swap_high 99

# 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 81 3128 1025-65535
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl dynamic urlpath_regex cgi-bin \?

http_access allow manager localhost
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

# Allow local network(s) on interface(s)
http_access allow localnet

# Default block all to be sure
http_access deny all
header_access X-Forwarded-For deny all
#follow_x_forwarded_for allow localnet
#follow_x_forwarded_for allow localhost
#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_access deny dontrewrite
http_access deny !getmethod
http_access allow store_rewrite_list_domain_CDN
http_access allow store_rewrite_list
http_access allow store_rewrite_list_domain
http_access allow store_rewrite_list_path
storeurl_access allow speedtest_allow_url
storeurl_access allow speedtest_allow_dom
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports
http_access deny all

#THE END OF CONFIGURATION
#=========================================================
load_check_stopen on
load_check_stcreate off
download_fastest_client_speed off
#=========================================================
hierarchy_stoplist cgi-bin ?
update_headers on
#———————————————————
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136
#=========================================================
pipeline_prefetch on
offline mode off

name : squid.conf

#—————————————————–#
## PROXY FMI – High Performance Configuration
## —————————————————#
## Support : http://tamampapua.wordpress.com
## Updated : 02/09/2011
#—————————————————–#

http_port 3128 transparent
icp_port 0
pid_filename /var/run/squid.pid
cache_effective_user proxy
cache_effective_group proxy
error_directory /usr/share/squid/errors/English
icon_directory /usr/share/squid/icons
visible_hostname NAMA BISNIS ANDA
cache_mgr admin@NAMA BISNIS ANDA
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
logfile_rotate 4
shutdown_lifetime 10 seconds

#SESUAIKAN DENGAN IP NETWORK LAN ANDA
acl localnet src 192.168.1.0/24

uri_whitespace strip
dns_nameservers 192.168.11.1 8.8.8.8 8.8.4.4

cache_mem 8 MB
maximum_object_size_in_memory 128 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

#SESUAIKAN DENGAN BESARAN PARTISI CACHE ANDA
cache_dir aufs /cache1 100000 64 256
cache_dir aufs /cache2 100000 64 256
cache_dir aufs /cache3 100000 64 256
cache_dir aufs /cache4 100000 64 256
cache_dir aufs /cache5 100000 64 256

minimum_object_size 512 bytes
maximum_object_size 128000 KB
offline_mode off
cache_swap_low 98
cache_swap_high 99
acl all src 0.0.0.0/0
acl localhost src 127.0.0.1/32
acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl dynamic urlpath_regex cgi-bin \?
#
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports
http_access allow localhost
http_access allow localnet
http_access deny all

acl store_rewrite_list urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3|e|g)|exe|msi|zip|on2|mar)\? \/ads\?
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|rar|mp3)\?
acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_domain 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_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.*
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id)
acl store_rewrite_list_domain_CDN url_regex \.photos-[a-z].ak.fbcdn.net
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/v.okezone.com\/get_video\/([A-Za-z]+[0-9].)
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|mp(4|3)|exe|msi|avi|(mp(e?g|a|e|1|2|3|4))|cab|exe)
acl store_rewrite_list_domain_CDN url_regex \.streamate.doublepimp.com.*\.js\? \.doubleclick\.net.* yieldmanager cpxinteractive quantserve\.com s.youtube.com
acl speedtest_allow_url url_regex -i \.speedtest\.net\/ speedtest
acl speedtest_allow_url url_regex ^http:\/\/speedtest\.*
acl speedtest_allow_dom dstdomain .speedtest.net
acl dontrewrite url_regex redbot\.org \.php
acl getmethod method GET
#
storeurl_access deny dontrewrite
storeurl_access deny !getmethod
storeurl_access allow store_rewrite_list_domain_CDN
storeurl_access allow store_rewrite_list
storeurl_access allow store_rewrite_list_domain
storeurl_access allow store_rewrite_list_path
storeurl_access allow speedtest_allow_url
storeurl_access allow speedtest_allow_dom
storeurl_access deny all
#
storeurl_rewrite_program /etc/squid/storeurl.pl
storeurl_rewrite_children 5
storeurl_rewrite_concurrency 99
#——————————————————————–
refresh_pattern \.(ini|ui|cmd)\? 0 0% 0
refresh_pattern \.(ini|ui|cmd) 0 0% 0
#====================================================================
# 1 year = 525600 mins, 1 month = 43800 mins
refresh_pattern porn.*\.flv 161280 100% 0 ignore-auth ignore-no-cache ignore-no-store ignore-private override-expire override-lastmod reload-into-ims store-stale
refresh_pattern imeem.*\.flv 0 0% 0 override-lastmod override-expire store-stale
refresh_pattern \.rapidshare.*\/[0-9]*\/.*\/[^\/]* 161280 90% 161280 ignore-reload store-stale
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 129600 999999% 129600 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?) 129600 999999% 129600 ignore-no-cache ignore-no-store ignore-private override-expire override-lastmod reload-into-ims store-stale
refresh_pattern \.(ico|video-stats) 129600 999999% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod ignore-must-revalidate negative-ttl=10080 store-stale
refresh_pattern \.etology\? 129600 999999% 129600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern galleries\.video(\?|sz) 129600 999999% 129600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern brazzers\? 129600 999999% 129600 override-expire ignore-reload ignore-no-cache store-stale
refresh_pattern \.adtology\? 129600 999999% 129600 override-expire ignore-reload ignore-no-cache store-stale
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).* 129600 20% 129600 ignore-no-cache ignore-no-store ignore-private override-expire ignore-reload ignore-auth ignore-must-revalidate store-stale negative-ttl=40320 max-stale=10
refresh_pattern ^.*safebrowsing.*google 129600 999999% 129600 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth ignore-must-revalidate negative-ttl=10080 store-stale
refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.uk) 129600 999999% 129600 override-expire ignore-reload ignore-private store-stale negative-ttl=10080
refresh_pattern ytimg\.com.*\.jpg 129600 999999% 129600 override-expire ignore-reload store-stale
refresh_pattern images\.friendster\.com.*\.(png|gif) 129600 999999% 129600 override-expire ignore-reload store-stale
refresh_pattern garena\.com 129600 999999% 129600 override-expire reload-into-ims store-stale
refresh_pattern photobucket.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 129600 999999% 129600 override-expire ignore-reload store-stale
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 129600 999999% 129600 ignore-no-cache override-expire override-lastmod store-stale
refresh_pattern mediafire.com\/images.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 129600 999999% 129600 reload-into-ims override-expire ignore-private store-stale
refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\. 129600 999999% 129600 reload-into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http:\/\/www.onemanga.com.*\/ 129600 999999% 129600 reload-into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http:\/\/download.windowsupdate.com.*\/ 129600 999999% 129600 reload-into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http:\/\/au.download.windowsupdate.com/msdownload/update/software/.*\/ 129600 999999% 129600 reload-into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern ^http:\/\/\.media[0-9][0-9]\.ord\.tube8\.com\/(.*)(flv|swf|wmv|mpg|mpeg|3gp) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale ignore-auth ignore-must-revalidate
refresh_pattern ^http:\/\/v.okezone.com\/get_video\/([A-Za-z]+[0-9].) 43200 99999% 43200 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale ignore-auth ignore-must-revalidate

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

# FACEBOOK IMAGE
refresh_pattern ((facebook.com)|(85.131.151.39)).*\.(jpg|png|gif) 21600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.fbcdn.net.*\.(jpg|gif|png|swf|mp3) 21600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern static\.ak\.fbcdn\.net*\.(jpg|gif|png) 21600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 21600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/facebook.com*\.(jpg|gif|png) 21600 999999% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale

# FACEBOOK GAMES
refresh_pattern ^http:\/\/apps.facebook.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.zynga.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.farmville.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.ninjasaga.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.mafiawars.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.crowdstar.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.popcap.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.castleville.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.cityville.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.chess.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.boyapoker.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.empiresandallies.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.playcastleville.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.ninjasaga.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.ninjakita.com.*\/ 10080 999999% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern -i \.texas_holdem.*\/ 10080 90% 43200 ignore-reload override-expire ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
refresh_pattern ^http://*.facebook.*/.* 720 100% 4320
refresh_pattern ^http://*.texas_holdem.*/.* 720 100% 4320
refresh_pattern ^http://*.zynga.com.*/.* 720 100% 4320
refresh_pattern ^http://*.ninjasaga.*/.* 720 100% 4320
refresh_pattern ^http://*.texas.poker.*/.* 720 100% 4320
refresh_pattern ^http://apps.facebook.com/.* 720 100% 4320
refresh_pattern ^http://*.kapanlagi.*/.* 720 100% 4320
refresh_pattern ^http://*.google-analytics.*/.* 720 100% 4320

# files
refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache store-stale ignore-must-revalidate
refresh_pattern -i \.(swf|wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern -i \.(hqx|pdf|rtf|doc)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern -i \.(inc|cab|ad|txt|dll|dl)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale ignore-must-revalidate
# 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 override-expire ignore-no-cache ignore-no-store store-stale ignore-auth

# DETIK
refresh_pattern -i ^http://.*\.detik\.com/ 0 50% 4320
refresh_pattern -i ^http://.*\.detiknews\.com/ 0 50% 4320
refresh_pattern -i ^http://.*\.detikhot\.com/ 0 50% 4320
refresh_pattern -i ^http://.*\.detikfinance\.com/ 0 50% 4320
refresh_pattern -i ^http://.*\.detiksport\.com/ 0 50% 4320

# SPESIFIC URL
refresh_pattern /.gif 4320 50% 43200
refresh_pattern /.jpg 4320 50% 43200
refresh_pattern /.jpeg 4320 50% 43200
refresh_pattern /.png 4320 50% 43200
refresh_pattern ^http://*.pog.*/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.games.co.id/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.y8.*/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.agame.*/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.teagames.com/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.freeonlinegames.com/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.1001onlinegames.com/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.ligagame.com/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.jobstreet.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache store-stale ignore-must-revalidate
refresh_pattern ^http://*.indowebster.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.21cineplex.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.kompas.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.blogspot.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache store-stale ignore-must-revalidate
refresh_pattern ^http://*.photobucket.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.tinypic.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.imageshack.us/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.kaskus.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.detik.*/.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://video.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://static.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.friendster.com/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.forummikrotik.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.ak.facebook.*/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.kaskus.*/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://*.static.ak.fbcdn.*/.* 259200 100% 518400 override-expire override-lastmod reload-into-ims
refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private store-stale ignore-must-revalidate
refresh_pattern ^http://(.*?)/videodownload\? 10080 90% 999999 override-expire ignore-no-cache ignore-private store-stale ignore-must-revalidate

# GAMES IIX
refresh_pattern ^http://file.pb.gemscool.com/hackshield/.* 60 100% 120 override-expire override-lastmod reload-into-ims store-stale
refresh_pattern ^http://file\.pb\.gemscool\.com/gamepatch/.*\.(exe|dll|cab|zip) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
refresh_pattern ^http://file\.fs\.gemscool\.com/JCE/.*\.(exe|dll|cab|zip) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
refresh_pattern ^http://file\.atlantica\.gemscool\.com/.*\.* 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
refresh_pattern ^http://122\.102\.49\.132/.*\.(zip|exe) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth ignore-no-store store-stale
refresh_pattern ^http://122\.102\.49\.202/.*\.(kom|zip|exe|stg) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth ignore-no-store store-stale
refresh_pattern ^http://.*\.cabalonline\.co\.id/.*\.(cab|zip|exe|rar|dat) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
refresh_pattern ^http://.*\.gemscool\.com/.*\.(cab|zip|exe|rar|dat) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
refresh_pattern ^http://patch\.crossfire\.web\.id/.*\.(cab|zip|exe|rar|dat) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale

# Ayo Dance
acl PURGE method PURGE
acl localhost src 127.0.0.1
http_access allow PURGE localhost
http_access deny PURGE
acl ayodance dst 122.102.49.132/32
always_direct allow ayodance
always_direct deny all

# Always allow localhost connections
acl pointblank src 203.89.146.0/32 ## pointblank
http_access allow localnet
http_access deny all

#antivirus
refresh_pattern avast.com.*\.vpx 40320 50% 161280 store-stale reload-into-ims
refresh_pattern (avgate|avira).*\.(idx|gz)$ 1440 90% 1440 ignore-reload ignore-no-cache ignore-no-store store-stale ignore-must-revalidate
refresh_pattern kaspersky.*\.avc$ 5259487 999999% 5259487 ignore-reload store-stale
refresh_pattern kaspersky 1440 50% 161280 ignore-no-cache store-stale
refresh_pattern mbamupdates.com.*\.ref 1440 50% 161280 reload-into-ims store-stale

#SPESIFIC GAMES URL
refresh_pattern ^http://*.lytogame.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.megaxus.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.ayodance.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.gemscool.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.wavegame.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.playcircle.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.lineage2.co.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.roseonline.web.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.xshot.web.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.romonline.web.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.iahgames.co.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.vtconline.co.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.blackshotonline.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.speedsoft.co.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.ijji.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.mmosite.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth store-stale ignore-must-revalidate

# 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 ignore-no-store store-stale
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/openx.kompas.com.*\/ 43200 99999% 129600 reload-into-ims ignore-reload override-expire 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 override-expire 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 override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.gemscool.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.pb.gemscool.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.atlantica.gemscool.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.fs.gemscool.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^http:\/\/img.vivanews.com.*\.(jpg|gif|png|swf) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale

#=========================================================
#All Web
refresh_pattern -i \. 10000 100% 43200 ignore-no-cache ignore-no-store override-lastmod reload-into-ims override-expire store-stale
refresh_pattern -i . 10000 100% 43200 ignore-no-cache ignore-no-store override-lastmod reload-into-ims override-expire store-stale
refresh_pattern ^http://*.* 820 94% 432000 reload-into-ims override-expire store-stale
refresh_pattern ^http://. 820 92% 432000 reload-into-ims override-expire store-stale
#=========================================================
#PEMBATASAN DOWNLOAD
acl download url_regex -i \.rm$ \.mpg$ \.mpeg$ \.avi$ \.dat$ \.vqf$ \.tar.gz$ \.gz$ \.rpm$ \.mp3$ \.3gp$ \.flv$ \.mp3$ \.mp4$
#acl download url_regex -i \.zip$ \.bz2$ \.rar$ \.qt$ \.ram$ \.rm$ \.iso$ \.raw$ \.wav$ \.mov$ \.cab$
#acl download url_regex -i \.rhz$ \.hlp$ \.psf$ \.exe$ \.bin$ \.cab$ \.amr$ \.msi$ \.dll$
delay_pools 1
delay_class 1 1
delay_parameters 1 1000/16000
delay_access 1 allow download
delay_access 1 deny ALL
#=========================================================
refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png) 5259487 999999% 5259487 ignore-no-cache ignore-no-store reload-into-ims override-expire ignore-must-revalidate store-stale
refresh_pattern \.(z(ip|[0-9]{2})|r(ar|[0-9]{2})|jar|bz2|gz|tar|rpm|vpu) 5259487 100% 5259487 override-expire reload-into-ims
refresh_pattern \.(mp3|wav|og(g|a)|flac|midi?|rm|aac|wma|mka|ape) 5259487 100% 5259487 override-expire reload-into-ims ignore-reload
refresh_pattern \.(exe|msi|dmg|bin|xpi|iso|swf|mar|psf|cab) 5259487 999999%% 5259487 override-expire reload-into-ims ignore-no-cache ignore-must-revalidate
refresh_pattern \.(mpeg|ra?m|avi|mp(g|e|4)|mov|divx|asf|wmv|m\dv|rv|vob|asx|ogm|flv|3gp|on2) 5259487 100% 5259487 override-expire reload-into-ims
refresh_pattern -i (cgi-bin) 0 0% 0
#=========================================================
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern ^ftp: 10080 95% 43200 override-lastmod reload-into-ims store-stale
refresh_pattern . 180 95% 43200 override-lastmod reload-into-ims store-stale
#=========================================================
load_check_stopen on
load_check_stcreate off
download_fastest_client_speed off
#=========================================================
hierarchy_stoplist cgi-bin ?
update_headers on
#———————————————————
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136
#=========================================================
pipeline_prefetch on
offline mode off

  1. #1 by elhadiry on July 17, 2012 - 2:21 pm

    Thanks tulisannya, bgs banget buat referensi. Tapi sayang format tulisanx tdk standar. Ketika script perl (storeurl.pl) tersebut dicopy & diimplementasikan, scriptnya jd tidak jalan. Stlh diteliti ternyata ada format tulisan yg bukan teks standar, spt tanda kutip (“).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: