Squid

  • 约 2 分钟
  • 449 字

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/

评论栏

分享你的想法,或参与下面的讨论。

参与讨论

支持 Markdown、代码和图片

撰写评论
正在加载编辑器…

友善交流,让讨论更有价值。

更多留言

加载中…