服务端:
1.yum install privoxy -y (代理服务器)
2./etc/privoxy/config 改成 listen-address 0.0.0.0:8118
客户端:
1.cat /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=http://192.168.1.9:8118"
Environment="HTTPS_PROXY=http://192.168.1.9:8118"
Environment="NO_PROXY=localhost,127.0.0.1,192.168.1.9"
2. 设置 /etc/profile 环境变量 永久生效
export http_proxy=http://192.168.1.9:8118
export https_proxy=https://192.168.1.9:8118