-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsquid.conf
77 lines (59 loc) · 2.41 KB
/
squid.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
## IPv6 local addresses:
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
# acl Safe_ports port 21 # ftp
# acl Safe_ports port 22 # ssh
# acl Safe_ports port 70 # gopher
acl Safe_ports port 80 # http
# acl Safe_ports port 210 # waiss
# acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 # https
# acl Safe_ports port 488 # gss-http
# acl Safe_ports port 591 # filemaker
# acl Safe_ports port 777 # multiling http
acl Safe_ports port 1025-65535 # unregistered ports
acl CONNECT method CONNECT
acl QUERY urlpath_regex cgi-bin \? asp aspx jsp
## Prevent caching jsp, cgi-bin etc
cache deny QUERY
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access deny to_localhost
## 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
access_log none
cache_dir null /tmp
cache_log /dev/null
cache_store_log none
max_filedescriptors 1024
## Use X-Forwarded-For header?
## Some consider this a privacy/security risk so it is often disabled
## However it can be useful to identify misbehaving/problematic clients
#forwarded_for on
#forwarded_for off
#forwarded_for delete
## Suppress sending squid version information
httpd_suppress_version_string on
## How long to wait when shutting down squid
shutdown_lifetime 5 seconds
## Replace the User Agent header. Be sure to deny the header first, then replace it :)
#request_header_access User-Agent deny all
#request_header_replace User-Agent Mozilla/5.0 (Windows; MSIE 9.0; Windows NT 9.0; en-US)
## Add any of your own refresh_pattern entries above these.
# 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