目录

CentOS设置网络代理

在网络代理的目标机安装`ss5`

snippet.bash
yum install pam-devel openldap-devel openssl-devel
yum -y install gcc automake make pam-devel openldap-devel cyrus-sasl-devel
wget https://sourceforge.net/projects/ss5/files/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz
snippet.bash
tar xvf ss5-3.8.9-5.tar.gz
cd ss5-3.8.9-5
./configure && make && make install
auth    0.0.0.0/0               -               -
permit -       0.0.0.0/0       -       0.0.0.0/0       -       -       -       -       -     
snippet.bash
chkconfig --add ss5
chkconfig --level 355 ss5 on

在网络代理的目标机安装`Privoxy`

参考文档:[centos设置用socks5代理](https://www.jianshu.com/p/dc3de7ef2898)
  • 下载安装包
snippet.bash
wget https://www.privoxy.org/sf-download-mirror/Sources/3.0.28%20%28stable%29/privoxy-3.0.28-stable-src.tar.gz
  • 安装
snippet.bash
tar axf privoxy-3.0.28-stable-src.tar.gz
cd privoxy-3.0.28-stable
yum -y install gcc autoconf
useradd privoxy
 
autoheader  &&  autoconf
./configure
make && make install
  • vim /usr/local/etc/privoxy/config
listen-address  [::]:8118
forward-socks5t   /               10.10.183.66:1080 .
  • 启动privoxy
snippet.bash
/etc/init.d/privoxy start

在需要代理网络的机器上配置代理

export http_proxy=http://10.10.183.66:8118
export https_proxy=http://10.10.183.66:8118
snippet.bash
wget http://baidu.com