From a1db338aad0b7433e1fc7876d9b36633d55485ed Mon Sep 17 00:00:00 2001 From: youyo <1003ni2@gmail.com> Date: Fri, 29 Sep 2023 09:10:32 +0900 Subject: [PATCH] =?UTF-8?q?=E8=AA=8D=E8=A8=BC=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 1 + passwd | 1 + squid.conf | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 passwd diff --git a/Dockerfile b/Dockerfile index 545600b..d7cdea0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ LABEL maintainer "youyo <1003ni@gmail.com>" RUN yum install -y squid ADD squid.conf /etc/squid/squid.conf +ADD passwd /etc/squid/passwd EXPOSE 3128/TCP 3389/TCP ENTRYPOINT ["/usr/sbin/squid","-f","/etc/squid/squid.conf","-N"] diff --git a/passwd b/passwd new file mode 100644 index 0000000..198dcbe --- /dev/null +++ b/passwd @@ -0,0 +1 @@ +hep_proxy_dkr9z:$apr1$PcvJ1K5n$vGs4B8J1OKKf7Avk66W6w1 diff --git a/squid.conf b/squid.conf index 890c235..b20c7fa 100644 --- a/squid.conf +++ b/squid.conf @@ -16,6 +16,11 @@ acl CONNECT method CONNECT # Workspaces IPs acl source src 13.231.36.66/32 +# basic auth +auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/passwd +acl password proxy_auth REQUIRED +http_access allow password + # Access Permission configuration http_access deny !Safe_ports http_access deny CONNECT !SSL_ports