一、安装shadowsocks
yum install python-setuptools && easy_install pip
pip install shadowsocks
二、后台运行shadowsocks,监听8888端口
ssserver -p 8888 -k password -m rc4-md5 --user nobody -d start
加入开机启动
centos 7
chmod +x /etc/rc.d/rc.local
echo "ssserver -p 8888 -k password -m rc4-md5 --user nobody -d start" >> /etc/rc.d/rc.local
centos 6
echo "ssserver -p 8888 -k password -m rc4-md5 --user nobody -d start" >> /etc/rc.d/rc.local
三、安装Privoxy
yum install -y privoxy
四、配置Privoxy
修改 vi /etc/privoxy/config
以下参数
listen-address 0.0.0.0:8118
enable-remote-toggle 1
在 /etc/privoxy/config
末尾添加参数
forward-socks5 / 127.0.0.1:8888
五、启动Privoxy
centos 7
systemctl daemon-reload
systemctl enable privoxy
systemctl start privoxy
centos 6
chkconfig privoxy on
service privoxy start
到此就可以直接使用这台机器作为http代理了,端口号为8118