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