ss5安装
#下载安装
yum -y install gcc gcc-c++ automake make pam-devel openldap-devel cyrus-sasl-devel
cd /data
wget http://downloads.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz
tar zxvf ./ss5-3.8.9-8.tar.gz
cd ss5-3.8.9
./configure
make
make install
#开机自启动
chmod +x /etc/init.d/ss5
chkconfig --add ss5
chkconfig --level 345 ss5 on
vi /etc/opt/ss5/ss5.conf
# 开启用户名密码验证机制
auth 0.0.0.0/0 - u
permit u 0.0.0.0/0 - 0.0.0.0/0 - - - - -
########## 无密码配置
auth 0.0.0.0/0 - -
permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -
# 设置用户名和密码
vi /etc/opt/ss5/ss5.passwd
user1 123
user2 234
#设置端口
vi /etc/sysconfig/ss5
# Add startup option here
SS5_OPTS=" -u root -b 0.0.0.0:8080"
#启动
service ss5 start
Privoxy部署
yum install privoxy
vim /etc/privoxy/config
confdir /etc/privoxy
logdir /var/log/privoxy
actionsfile match-all.action # Actions that are applied to all sites and maybe overruled later on.
actionsfile default.action # Main actions file
actionsfile user.action # User customizations
filterfile default.filter
filterfile user.filter # User customizations
logfile logfile
listen-address 0.0.0.0:8118
toggle 1
enable-remote-toggle 1
enable-remote-http-toggle 0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
enable-proxy-authentication-forwarding 0
forwarded-connect-retries 0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
tolerate-pipelining 1
socket-timeout 300
forward-socks5t / 127.0.0.1:8080 .
# 启动
service privoxy restart
其他服务器使用
# 无密码
export http_proxy=http://10.21.8.64:8118
export https_proxy=http://10.21.8.64:8118
# 有用户名密码
export http_proxy=http://username:password@proxyserver:port/
export ftp_proxy=http://username:password@proxyserver:port/
参考
在Linux上搭建Socks5 Proxy代理服务器
搭建自己的http代理服务器
使用Privoxy将socks5代理转为http代理