Skip to content

Commit dfd156c

Browse files
committed
squid v2.0.0 added
1 parent b3c238c commit dfd156c

File tree

5 files changed

+65
-2
lines changed

5 files changed

+65
-2
lines changed

squid/.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.0
1+
v2.0.0

squid/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
FROM ubuntu/squid:edge
2-
LABEL maintainer="Tech Thinker <https://techthinker.js.org>"
2+
LABEL maintainer="Tech Thinker <https://techthinker.js.org>"
3+
4+
COPY squid.conf /etc/squid/squid.conf
5+
COPY htpasswd /etc/squid/htpasswd

squid/docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3"
2+
3+
services:
4+
squid:
5+
build:
6+
context: .
7+
container_name: squid
8+
ports:
9+
- "3128:3128"
10+
volumes:
11+
- ./htpasswd:/etc/squid/htpasswd
12+
- data:/var/spool/squid
13+
volumes:
14+
data:

squid/htpasswd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
squid:$apr1$Aj/FjDtq$BIuMh/qMs/w9MwT4XJv561

squid/squid.conf

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpasswd
2+
auth_param basic realm Squid Proxy Cache Server
3+
4+
acl authenticated proxy_auth REQUIRED
5+
acl authenticated_ips src all
6+
7+
# acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
8+
# acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
9+
# acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
10+
# acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
11+
# acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
12+
# acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
13+
# acl localnet src fc00::/7 # RFC 4193 local private network range
14+
# acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
15+
acl SSL_ports port 443
16+
acl Safe_ports port 80 # http
17+
acl Safe_ports port 21 # ftp
18+
acl Safe_ports port 443 # https
19+
acl Safe_ports port 70 # gopher
20+
acl Safe_ports port 210 # wais
21+
acl Safe_ports port 1025-65535 # unregistered ports
22+
acl Safe_ports port 280 # http-mgmt
23+
acl Safe_ports port 488 # gss-http
24+
acl Safe_ports port 591 # filemaker
25+
acl Safe_ports port 777 # multiling http
26+
acl CONNECT method CONNECT
27+
http_access deny !Safe_ports
28+
http_access deny CONNECT !SSL_ports
29+
http_access allow localhost manager
30+
http_access deny manager
31+
http_access allow localhost
32+
# http_access allow localnet
33+
http_access allow authenticated authenticated_ips
34+
http_access deny all
35+
http_port 3128
36+
coredump_dir /var/spool/squid
37+
refresh_pattern ^ftp: 1440 20% 10080
38+
refresh_pattern ^gopher: 1440 0% 1440
39+
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
40+
refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
41+
refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
42+
refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
43+
refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
44+
refresh_pattern . 0 20% 4320
45+
logfile_rotate 0

0 commit comments

Comments
 (0)