Authored by chunhua.zhang

Add new file

  1 +#
  2 +# Recommended minimum configuration:
  3 +#
  4 +
  5 +# Example rule allowing access from your local networks.
  6 +# Adapt to list your (internal) IP networks from where browsing
  7 +# should be allowed
  8 +acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  9 +acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
  10 +acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  11 +acl localnet src fc00::/7 # RFC 4193 local private network range
  12 +acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
  13 +
  14 +acl SSL_ports port 443
  15 +acl Safe_ports port 80 # http
  16 +acl Safe_ports port 21 # ftp
  17 +acl Safe_ports port 443 # https
  18 +acl Safe_ports port 70 # gopher
  19 +acl Safe_ports port 210 # wais
  20 +acl Safe_ports port 1025-65535 # unregistered ports
  21 +acl Safe_ports port 280 # http-mgmt
  22 +acl Safe_ports port 488 # gss-http
  23 +acl Safe_ports port 591 # filemaker
  24 +acl Safe_ports port 777 # multiling http
  25 +acl CONNECT method CONNECT
  26 +
  27 +acl ip1 src 218.94.75.50
  28 +acl ip2 src 218.94.75.58
  29 +acl ip3 src 123.56.138.21
  30 +acl ip4 src 123.57.153.187
  31 +acl ip5 src 123.56.238.71
  32 +acl ip6 src 54.222.135.182
  33 +acl ip7 src 123.206.51.23
  34 +acl ip10 src 54.222.146.59
  35 +acl ip11 src 54.222.0.0/16
  36 +
  37 +acl manager proto cache_object
  38 +
  39 +#redirect_program /Data/local/squid-3.5.19/bin/proxy.py
  40 +#redirect_children 10
  41 +
  42 +http_access allow ip1
  43 +http_access allow ip2
  44 +http_access allow ip3
  45 +http_access allow ip4
  46 +http_access allow ip5
  47 +http_access allow ip6
  48 +http_access allow ip7
  49 +http_access allow ip10
  50 +http_access allow ip11
  51 +
  52 +cache_replacement_policy lru
  53 +cache_mem 1024 MB
  54 +cache_effective_user nobody
  55 +cache_effective_group nobody
  56 +maximum_object_size 4096 KB
  57 +maximum_object_size_in_memory 512 KB
  58 +reply_body_max_size 5116 KB
  59 +minimum_object_size 1 bytes
  60 +client_persistent_connections on
  61 +server_persistent_connections on
  62 +persistent_request_timeout 60 seconds
  63 +request_timeout 240 seconds
  64 +client_lifetime 240 seconds
  65 +connect_timeout 240 seconds
  66 +read_timeout 240 seconds
  67 +pconn_timeout 60 seconds
  68 +
  69 +refresh_pattern -i \.gif$ 1440 90% 129600 reload-into-ims
  70 +refresh_pattern -i \.swf$ 1440 90% 129600 reload-into-ims
  71 +refresh_pattern -i \.jpg$ 1440 90% 129600 reload-into-ims
  72 +refresh_pattern -i \.png$ 1440 90% 129600 reload-into-ims
  73 +refresh_pattern -i \.bmp$ 1440 90% 129600 reload-into-ims
  74 +refresh_pattern -i \.js$ 120 90% 600 reload-into-ims
  75 +refresh_pattern -i \.css$ 120 90% 600 reload-into-ims
  76 +
  77 +#
  78 +# Recommended minimum Access Permission configuration:
  79 +#
  80 +# Deny requests to certain unsafe ports
  81 +http_access deny !Safe_ports
  82 +
  83 +# Deny CONNECT to other than secure SSL ports
  84 +http_access deny CONNECT !SSL_ports
  85 +
  86 +# Only allow cachemgr access from localhost
  87 +#http_access allow localhost manager
  88 +#http_access deny manager
  89 +http_access allow manager
  90 +
  91 +# We strongly recommend the following be uncommented to protect innocent
  92 +# web applications running on the proxy server who think the only
  93 +# one who can access services on "localhost" is a local user
  94 +#http_access deny to_localhost
  95 +
  96 +#
  97 +# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  98 +#
  99 +
  100 +# Example rule allowing access from your local networks.
  101 +# Adapt localnet in the ACL section to list your (internal) IP networks
  102 +# from where browsing should be allowed
  103 +http_access allow localnet
  104 +http_access allow localhost
  105 +
  106 +# And finally deny all other access to this proxy
  107 +http_access deny all
  108 +#http_access allow all
  109 +
  110 +# Squid normally listens to port 3128
  111 +http_port 8091
  112 +
  113 +# Uncomment and adjust the following to add a disk cache directory.
  114 +cache_dir ufs /Data/local/squid-3.5.19/var/cache/squid 4096 10 10
  115 +
  116 +# Leave coredumps in the first cache dir
  117 +coredump_dir /Data/local/squid-3.5.19/var/cache/squid
  118 +
  119 +#
  120 +# Add any of your own refresh_pattern entries above these.
  121 +#
  122 +refresh_pattern ^ftp: 1440 20% 10080
  123 +refresh_pattern ^gopher: 1440 0% 1440
  124 +refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  125 +refresh_pattern . 0 20% 4320
  126 +