Proxy - squid3 (http)

环境 Debian 10

安装

apt install squid apache2-utils

创建密码文件

htpasswd -c  /etc/squid/squid.pwd <用户名>

配置认证程序

auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid.pwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

允许密码

acl password proxy_auth REQUIRED
http_access allow password

取消deny all

#http_access deny all

问题:

1. squid3无法启动:
查看/var/log/squid3/cache.log
原则上可以把密码文件放在任何位置,但是如果放在/root下,则squid3无法访问该文件。

gradle.properties

systemProp.http.proxyHost=10.70.52.159
systemProp.http.proxyPort=3128
systemProp.http.proxyUser=linux
systemProp.http.proxyPassword=linux

systemProp.https.proxyHost=10.70.52.159
systemProp.https.proxyPort=3128
systemProp.https.proxyUser=linux
systemProp.https.proxyPassword=linux