forked from pythonhacker/rotating-proxy-daemon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
squid.conf
74 lines (58 loc) · 2.31 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
# Standard squid configuration for proxy nodes - can be edited to suit your needs
# though it is advisable to keep most of the configuration (except the paths) unchanged.
# Header control
via off
forwarded_for off
request_header_access From deny all
request_header_access Server deny all
request_header_access WWW-Authenticate deny all
request_header_access Link deny all
request_header_access Cache-Control deny all
request_header_access Proxy-Connection deny all
request_header_access X-Cache deny all
request_header_access X-Cache-Lookup deny all
request_header_access Via deny all
request_header_access X-Forwarded-For deny all
request_header_access Pragma deny all
# request_header_access Keep-Alive deny all
# disk and memory cache settings
cache_dir aufs /usr/local/squid/var/cache 500 16 256
maximum_object_size 4096 KB
# store coredumps in the first cache dir
coredump_dir /usr/local/squid/var/cache #change your cache location
# the hostname squid displays in error messages
visible_hostname localhost
# log & process ID file details
#change it according to your path
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
#cache_store_log /Users/newscred/Library/Logs/squid/squid-store
pid_filename /usr/local/squid/var/run/squid.pid
# Squid listening port
http_port 8321
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/squid_passwd
# Access Control lists
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
# acl manager proto cache_object
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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
acl myfetchers proxy_auth REQUIRED
acl local src 127.0.0.1
acl godirect dstdomain google.com
http_access allow myfetchers
http_access allow local
http_access deny all
# logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
logformat squid [%tl] %6tr %>a %Ss/%03Hs %<st %rm %ru %un %>ha %Sh/%<A %mt
access_log /var/log/squid3/access.log squid