конфиг:##squid.conf begin
#http_port 192.168.10.51:3128
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
icp_port 0
no_cache deny QUERY
# CACHE SIZE = 2GB, 102400 units
#ipcache_size 10240
cache_dir ufs /squid/var/cache 2048 16 256
auth_param basic program /squid/etc/ncsa_auth /squid/etc/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
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 CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
# OUR USERS AUTHENTICATION SCHEME:
acl superusers proxy_auth "/squid/etc/superusers"
acl utimeusers proxy_auth "/squid/etc/utimeusers"
acl users src 192.168.150.3/32 - для эксперимента!
# acl users proxy_auth "/squid/etc/users"
acl allusers proxy_auth REQUIRED
acl worktime time 09:00-19:00
acl downloadtime time 09:00-17:00
authenticate_ip_ttl 600 seconds
# 10 min
acl max max_user_ip -s 1
# -s for ip_ttl
http_access deny max
# 10 min user+IP
http_access allow superusers
http_access allow utimeusers
http_access allow allusers worktime
http_access deny all
http_reply_access allow all
icp_access allow all
cache_mgr admin@fsnp.gov.ru
cache_effective_user proxy
cache_effective_group proxy
# OUR POOL SCHEME
reply_body_max_size 1000000 allow users downloadtime
#reply_body_max_size 1000000 allow !users
delay_initial_bucket_level 100
delay_pools 2 #2 pools total
delay_class 1 2 #pool 1 is a class 2 pool
delay_access 1 allow superusers
delay_access 1 deny all
delay_parameters 1 16000/16000 -1/-1 #overall limit 128kbit/s for all
delay_class 2 2 #pool 2 is a class 2 pool
delay_access 2 allow allusers utimeusers
delay_access 2 deny all
delay_parameters 2 16000/16000 4000/8000 #128kbit/s max(thus, 2xProxies give 128x2=256kbit/
###squid.conf end