Saturday, December 15, 2007

Squid as an anonymizer proxy - squid.conf


squid.conf
# Squid as an anonymizer proxy
#
# alexandre.dulaunoy@ael.be
# adulau@foo.be

http_port 127.0.0.1:3128

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

# No local caching
maximum_object_size 0 KB
minimum_object_size 0 KB

# No local log
cache_access_log /dev/null
cache_store_log /dev/null

# email use for ftp anonymous access
ftp_user ael-anonymous-proxy@ael.be
# check ftp data connection
ftp_sanitycheck on

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

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

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 all
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports

# And finally deny all other access to this proxy
http_access deny all
http_reply_access allow all

icp_access deny all
ident_lookup_access deny all

# No limit in size by default for the reply
# reply_body_max_size 0 allow all

cache_mgr aelanonproxy-manager@ael.be
cache_effective_user squid
visible_hostname gilmore.ael.be
# no forwarded quite useless for an anonymizer
forwarded_for off
# no client stat
client_db off

#
# Paranoid anonymize

header_access Allow allow all
header_access Authorization allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_access Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow all
header_access Location allow all
header_access Pragma allow all
header_access Accept allow all
#header_access Charset allow all
header_access Accept-Encoding allow all
header_access Accept-Language allow all
header_access Content-Language allow all
header_access Mime-Version allow all
header_access Retry-After allow all
header_access Title allow all
header_access Connection allow all
header_access Proxy-Connection allow all
header_access All deny all

header_replace User-Agent AEL/www.ael.be - Anonymous Proxy - We protect fundamental rights (Linux; Intel)

icon_directory /data/squid/share/icons

strip_query_terms on

coredump_dir /data/squid/var/cache