-
Notifications
You must be signed in to change notification settings - Fork 0
/
Squid
42 lines (41 loc) · 1.12 KB
/
Squid
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
cat <<SQUID >/etc/squid/squid.conf
acl localnet src 0.0.0.1-0.255.255.255
acl localnet src 10.0.0.0/8
acl localnet src 100.64.0.0/10
acl localnet src 169.254.0.0/16
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
acl Safe_ports port 22
acl Safe_ports port 443
acl Safe_ports port 550
acl Safe_ports port 555
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl VPN dst $(wget -4qO- http://ipinfo.io/ip)/32
http_access allow localhost manager
http_access deny manager
http_access allow VPN
http_access allow localhost
http_access deny all
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
dns_nameservers 1.1.1.1 1.0.0.1
http_port 8080
http_port 8000
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
visible_hostname localhost
coredump_dir /var/spool/squid
SQUID
systemctl enable squid
systemctl restart squid