相关配置
OS:CentOS release 6.8 (final)
1.安装Shadowsocks Server
2.配置/etc/shadowsocks.json
# vim /etc/shadowsocks.json
{
"server": "0.0.0.0", 定义监听的服务器地址为任意地址
"server_port": 9002, 服务器端口为9002
"local_address": "127.0.0.1", 客户端本地监听地址为127.0.0.1
"local_port": 1080, 客户端本地监听端口为1080
"password": "passwd", 密码设置
"timeout": 300, 连接超时时间为300秒
"method": "aes-256-cfb", 加密方式
"fast_open": false, 默认关闭fast_open属性
"workers": 1 定义进程数为1
}
3.配置/etc/sysctl.conf,新增如下配置
# vim /etc/sysctl.conf
# For shadowsocks
fs.file-max = 65535
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5120
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = hybla
# sysctl -p 立即执行所设定内核参数
4.启动Shadowsocks服务
# ssserver -c /etc/shadowsocks.json -d start
# netstat -lntp | grep 9002 查看服务是否开启
5.Github下载相应客户端
6.配置客户端
7.Enjoy!
反思
在之后配置Raspberry Pi Shadowsocks的时候, 发现了很多问题,比如- 防火墙端口没有打开
- 服务没有运行起来