Skip to content

Instantly share code, notes, and snippets.

@ym
Created February 25, 2012 07:08
Show Gist options
  • Save ym/1907165 to your computer and use it in GitHub Desktop.
Save ym/1907165 to your computer and use it in GitHub Desktop.
squid.conf
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl localhost src ::1/128
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl to_localhost dst ::1/128
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl localnet src fc00::/7
acl localnet src fe80::/10
acl SSL_ports port 443
acl Safe_ports port 80 21 443 70 210 280 488 591 777 7778 7777 8080 8088 2082 2083
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
reply_body_max_size 32 MB
http_access allow localnet
http_access allow localhost
http_access allow all
http_port 2012
hierarchy_stoplist cgi-bin ?
coredump_dir /dev/shm/squid/cache
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
cache_mem 8 MB
cache_mgr [email protected]
maximum_object_size 1024 KB
maximum_object_size_in_memory 1 KB
memory_pools_limit 1 MB
#dns_nameservers 2001:470:20::2 8.8.8.8 8.8.4.4
dns_nameservers 8.8.8.8 8.8.4.4
visible_hostname apn-proxy
access_log none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment