yum install -y squid
/etc/squid/squid.conf
修改以下行
http_access allow all
# 默认3128可以修改不修改也可以
http_port 8080
systemctl enable --now squid
Windows客户端

Linux客户端
echo 'export http_proxy=192.168.31.18:8080' >> /etc/profile
echo 'export https_proxy=192.168.31.18:8080' >> /etc/profile
source /etc/profile