Monday, April 10, 2006

::Squid::

Ini sekedar tambahan memory aja buat aku, karena terus terang otak-ku sekarang udah penuh. Sapo tahu ada yang butuh juga silakan diambil.



/etc/squid/squid.conf

http_port 8080
icp_port 0
cache_mem 6 MB
cache_swap_low 98
cache_swap_high 99
maximum_object_size 128 MB
maximum_object_size_in_memory 16 KB
ipcache_size 512
fqdncache_size 256
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_dir aufs /etc/squid/cache 30000 10 256
cache_dir aufs /etc/squid/cache1 30000 10 256
cache_dir aufs /etc/squid/cache2 30000 10 256
cache_dir aufs /etc/squid/cache3 30000 10 256
memory_pools_limit off
redirect_rewrites_host_header off
half_closed_clients off
#-----------transparent proxy -----------
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
#-------------------------------------------
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl lan src 192.168.64.0/255.255.255.0
acl Safe_ports port 80 81 443 210 119 563 70 21 1025-65535
acl CONNECT method CONNECT
#acl xxx dstdomain download02.isix.net .gay.com
#acl boleh url_regex -i "/etc/squid/boleh"
#acl dilarang url_regex -i "/etc/squid/dilarang"
#no_cache deny dilarang
#http_access allow boleh all
#http_access deny dilarang all
#http_access deny xxx
http_access allow lan
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT
http_access deny all
#---------------- administration info ------------
#cache_store_log none
#cache_access_log /dev/null
cache_mgr hoho@proxy.joknet.net
cache_effective_user squid
cache_effective_group squid
log_icp_queries off
cachemgr_passwd hoho123 all
forwarded_for on
buffered_logs on
visible_hostname proxy.joknet.net
ftp_user ekowahyu@lincak.net
shutdown_lifetime 10 seconds
refresh_pattern ^ftp: 10080 50% 40320 reload-into-ims override-lastmod
refresh_pattern . 120 50% 10080 reload-into-ims override-lastmod
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 98
reload_into_ims on
pipeline_prefetch on
vary_ignore_expire on
ie_refresh off
#redirect_program /usr/local/adzap/scripts/wrapzap





#------------------------ DELAY POLL KONFIGURASI JOKNET ---------------------------
#This is the most important part for shaping incoming traffic with Squid
#For detailed description see squid.conf file or docs at http://www.squid-cache.org
#We don't want to limit downloads on our local network
acl magic_words1 url_regex -i 192.168.64.
#We want to limit downloads of these type of files
#Put this all in one line
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav .msi
#We don't block .html, .gif, .jpg and similar files, because they
#generally don't consume much bandwith
#We have two different delay_pools
delay_pools 2
#First delay pool
#W don't want to delay our local traffic
#There are three pool classes; here we will deal only with the second
delay_class 1 2
#-1/-1 mean that there are no limits
delay_parameters 1 -1/-1 -1/-1
#magic_words1: 192.168
delay_access 1 allow magic_words1
#Second delay pool
#we want to delay downloading files mentioned in magic_words2
delay_class 2 2
#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s
delay_parameters 2 1000/3200 1000/3200
delay_access 2 allow magic_words2
#--------------------------------------------------------------------------------



0 Comments:

Post a Comment

<< Home