Shadowsocks安装与优化,GFW相关资料

System: CentOS 6 x86

安装与基本配置:

经过对比,选择使用Shadowsocks-libev版本

安装

1
2
3
4
5
6
7
yum update
yum install build-essential autoconf libtool gcc zlib-devel openssl-devel git -y
git clone git://github.com/madeye/shadowsocks-libev.git
cd shadowsocks-libev
./configure
make
make install

防火墙设置

1
2
# 需要改进研究
iptables -A INPUT -p tcp --dport 443 -j ACCEPT

自启动设置

简单设置

1
2
# 注意使用绝对路径
echo "/usr/local/bin/ss-server -c /home/***/config.json -f /tmp/ss-server.pid" >> /etc/rc.local

使用 supervisor

1
2
3
yum install python-setuptools
easy_install supervisor
echo_supervisord_conf > /etc/supervisord.conf

配置 supervisor
vim /etc/supervisord.conf

1
2
3
4
5
6
7
[program:shadowsocks]
command = ss-server -c /home/gzm/config2.json
user = phpgao
autostart = true
autoresart = true
stderr_logfile = /var/log/supervisor/ss.stderr.log
stdout_logfile = /var/log/supervisor/ss.stdout.log

运行 supervisor
supervisord -c /etc/supervisord.conf
自启动
echo "supervisord -c /etc/supervisord.conf" >> /etc/rc.local

优化: