部署Shadowsocks服务器
Last updated
Was this helpful?
Last updated
Was this helpful?
本文参考,但是在CentOS 7上略有不同,所以此处先记录,再单独整理一份CentOS7部署。
编译环境准备&安装依赖包
克隆源码
开始编译
如果遇到报错:
configure: error: mbed TLS libraries not found.
,参考,安装mbedtls-devel
configure: error: The Sodium crypto library libraries not found.
,则安装libsodium-devel
configure: error: The c-ares library libraries not found.
,则安装c-ares-devel
configure: error: Couldn't find libev. Try installing libev-dev[el].
,则安装libev-devel
准备必须的文件
创建文件命令
内容参考如下:
单端口:
注意:
"server_port":8888
是对外提供服务的端口(可自行修改),要保证没有防火墙阻碍
"local_port":1080,
是ss客户端在本地提供的sockes代理端口
多端口:
添加开机自启动服务
如果采用init脚本,则可以使用:
启动服务
注意:客户端Shadow Socket连接以后,需要设置客户端proxy指向自己本机的
1080
端口。如果客户端软件自动设置则ok,否则要想办法手工设置。
这里方法采用了rc.d执行脚本,适合早期CentOS6系列操作系统。CentOS 7系统参考
- 在CentOS上安装Shadowsocks的脚本,采用直接安装第三方repo提供的rpm安装