Skip to content

squid命令

安装命令

sudo yum install squid -y

配置文件位置

shell

sudo vi /etc/squid/squid.conf
安装
sudo yum install httpd-tools
创建密码文件
sudo htpasswd -c /etc/squid/squid_passwd sunbao
sun890527
890527
sudo systemctl restart squid
sudo systemctl enable squid
检查白名单
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT

squid反向代理带账号密码访问

shell

curl -x http://8.141.120.173:3128 -U sunbao:sun890527 https://www.baidu.com
curl -x http://8.141.120.173:3128 https://www.baidu.com
curl -x http://8.141.120.173:3129 -U sunbao:sun890527  -v https://plugins.jetbrains.com
curl -x http://8.141.120.173:3128 -U sunbao:sun890527  -v https://www.baidu.com