Squid

1 — Installing Squid Proxy

apt install squid

2. 配置代理服务器密码

apt install apache2-utils

生产密码

htpasswd -c /etc/squid/passwords your_squid_username

编辑配置文件

/etc/squid/squid.conf
加入以下内容

# 密码相关
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated

# 端口相关
#http_port 3128
http_port 443

启动

# 启动
systemctl start squid
# 开机启动
systemctl enable squid

验证

curl -v -x http://your_squid_username:your_squid_password@your_server_ip:3128 https://www.google.com/

评论栏