1.安装编译环境
yum -y install gcc automake make
2.安装ss5必要的包
yum -y install pam-devel openldap-devel cyrus-sasl-devel openssl-devel
3.下载并安装ss5
wget http://sourceforge.net/projects/ss5/files/latest/download?source=files
tar zxvf ss5-*
cd ss5-*
./configure
make
make install
#更改ss5权限,使其可执行
chmod 700 /etc/init.d/ss5
#启动ss5服务
/etc/init.d/ss5 start
如果下载时提示404错误,尝试从 http://sourceforge.net/projects/ss5/ 这里获取最新版本的下载
地址。
4.配置ss5,允许指定用户可以使用
ss5 默认情况下使用1080 端口,并且允许任何人使用。如果想要指定某个人才可以使用的话,则需要修
改 /etc/opt/ss5/ss5.conf 中的
# SHost SPort Authentication
#
auth 0.0.0.0/0 - -
#修改为:
# SHost SPort Authentication
#
auth 0.0.0.0/0 - u
# Auth SHost SPort DHost DPort Fixup Group Band
ExpDate
#
#permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -
修改为:
# Auth SHost SPort DHost DPort Fixup Group Band
ExpDate
#
permit u 0.0.0.0/0 - 0.0.0.0/0 - - - - -
5.添加ss5用户
最后需要在 /etc/opt/ss5/ss5.passwd 中添加连接 socks 5 时使用的 用户名和密码 如:
test passwd
6.重启ss5服务
/etc/init.d/ss5 restart
#或者
service ss5 restart
7.设置开机启动
#设置开机启动
chkconfig ss5 on
最后别忘记修改防火墙规则,添加ss5端口例外哦。
注意: ss5.passwd 权限设置为640时ss5将无法读取里面内容,默认644即可
参考:http://www.liuyuelong.net/post/10.html
转载于:https://blog.51cto.com/thinkpig007/1580055