78 lines
2.4 KiB
SquidConf
78 lines
2.4 KiB
SquidConf
#
|
|
# Recommended minimum configuration:
|
|
#
|
|
acl manager proto cache_object
|
|
acl localhost src 127.0.0.1/32 ::1
|
|
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
|
|
|
|
# Example rule allowing access from your local networks.
|
|
# Adapt to list your (internal) IP networks from where browsing
|
|
# should be allowed
|
|
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 localnet src fc00::/7 # RFC 4193 local private network range
|
|
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
|
|
|
|
acl CONNECT method CONNECT
|
|
|
|
#
|
|
# Recommended minimum Access Permission configuration:
|
|
#
|
|
# Only allow cachemgr access from localhost
|
|
http_access allow manager localhost
|
|
http_access deny manager
|
|
|
|
# We strongly recommend the following be uncommented to protect innocent
|
|
# web applications running on the proxy server who think the only
|
|
# one who can access services on "localhost" is a local user
|
|
http_access deny to_localhost
|
|
|
|
#
|
|
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
|
|
#
|
|
|
|
# Example rule allowing access from your local networks.
|
|
# Adapt localnet in the ACL section to list your (internal) IP networks
|
|
# from where browsing should be allowed
|
|
http_access allow localnet
|
|
http_access allow localhost
|
|
|
|
# And finally deny all other access to this proxy
|
|
http_access deny all
|
|
|
|
# Squid normally listens to port 3128
|
|
http_port 3128
|
|
|
|
# We recommend you to use at least the following line.
|
|
# hierarchy_stoplist cgi-bin ?
|
|
|
|
cache_mem 512 MB
|
|
maximum_object_size_in_memory 512 KB
|
|
maximum_object_size 512 MB
|
|
# Uncomment and adjust the following to add a disk cache directory.
|
|
cache_dir aufs /var/squid/cache 25000 16 256
|
|
|
|
cache_store_log /var/log/squid/store.log
|
|
|
|
logformat squid %tl %6tr %>a %Ss/%>Hs %<st %rm %ru %<A %mt %>h %<h
|
|
access_log /var/log/squid/access.log squid
|
|
vary_ignore_expire on
|
|
|
|
# Leave coredumps in the first cache dir
|
|
coredump_dir /var/spool/squid
|
|
|
|
reload_into_ims on
|
|
# Add any of your own refresh_pattern entries above these.
|
|
refresh_pattern . 86400 50% 518400 ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth override-expire override-lastmod
|
|
|
|
quick_abort_min -1 QB
|
|
read_ahead_gap 100 MB
|
|
|
|
positive_dns_ttl 30 second
|
|
negative_dns_ttl 1 second
|
|
|
|
pipeline_prefetch on
|
|
vary_ignore_expire on
|
|
request_timeout 15 minute
|