# /etc/squid/squid.conf
#
# ::copy::
# ::maintainer::
#
# config file based on SQUID 3.0.STABLE1
#
# only explicit original settings are kept, our changes
# are surrounded by [ku] tags
#

# ACL
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8

acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
acl localnet src 192.168.0.0/16	# RFC1918 possible internal network

acl SSL_ports port 443
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
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

#[ku]
acl SSL_ports	port 631	# cups administration
acl SSL_ports	port 81		# common alternative https port
acl Safe_ports	port 81		# common alternative http port
acl SSL_ports	port 10000	# usual webmin port
acl SSL_ports	port 20000	# usual usermin port
::squid.acl_defines::
#[ku] --

http_access allow manager localhost
#[ku]
http_access allow manager net_manager
#[ku] --
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#[ku]
http_access allow net_allowed
#[ku] --
http_access allow localhost
http_access deny all


icp_access allow localnet
icp_access deny all
htcp_access allow localnet
htcp_access deny all


# NETWORK OPTIONS
#
http_port 3128


# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
#
hierarchy_stoplist cgi-bin ?


# DISK CACHE OPTIONS
#
#[ku]
cache_replacement_policy heap LFUDA
cache_dir ufs ::squid.cache_dir:: ::squid.cache_size:: 32 256
maximum_object_size ::squid.max_objsize::
#[ku] --


# LOGS
#
access_log /var/log/squid/access.log squid

# per loggare i singoli ip mettere questo (attenzione, problemi di
# privacy, gli utenti devono essere avvertiti in modo chiaro che le
# loro connessioni, in questo caso, sono loggate)
# client_netmask 255.255.255.255
#[ku]
client_netmask ::squid.client_netmask::
#[ku] --


# COSMETICS
#[ku]
ftp_list_width	48
#[ku] --


# OPTIONS FOR TUNING THE CACHE
#
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern .		0	20%	4320

#[ku]
negative_ttl		1 minutes
negative_dns_ttl	1 minutes
#[ku] --


# PRIVACY SETTINS
#
#
#[ku]
# hide internal address (why this is not the default?!?)
forwarded_for transparent
::env.tmp_anon_conf::
#[ku] --



# TIMEOUTS
#
shutdown_lifetime 5 seconds


# ADMINISTRATIVE PARAMETERS
#
#[ku]
cache_mgr ::squid.admin_email::
mail_from ::network.hostname::.::network.domain::
cache_effective_user proxy
cache_effective_group squid
httpd_suppress_version_string on
visible_hostname unconfigured
unique_hostname ::network.hostname::.::network.domain::
#[ku] --


# ICP OPTIONS
#
icp_port 3130

# ERROR PAGE OPTIONS
#
#[ku]
error_directory ::squid.error_directory::
#[ku] --


# MISC OPTIONS
#
coredump_dir /var/spool/squid
