Centos 安装代理服务器 Squid

代理squid

在有外网服务器上

1
2
3
yum install -y squid
systemctl start squid

在无外网服务器上

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

export http_proxy=http://192.168.0.217:3128
export https_proxy=http://192.168.0.217:3128

export no_proxy="127.0.0.1, localhost, 192.168.1.85,192.168.1.241,192.168.1.63,192.168.1.58,192.168.1.93,192.168.1.116,192.168.1.250,192.168.1.171,192.168.1.139"

127.0.0.1 | localhost | 192.168.1.85 | 192.168.1.241 | 192.168.1.63 | 192.168.1.58 | 192.168.1.93 | 192.168.1.116 | 192.168.1.250 | 192.168.1.171 | 192.168.1.139

source /etc/profile
echo $http_proxy


-Dhttp.proxyHost=192.168.1.63 -Dhttp.proxyPort=3128 -Dhttps.proxyHost=192.168.1.63 -Dhttps.proxyPort=3128



export http_proxy=http://192.168.0.217:3128
export https_proxy=http://192.168.0.217:3128
export no_proxy="127.0.0.1, localhost, 192.168.0.217,192.168.0.196"