【转】CentOS 6安装Shadowsocks-libev以及相关配置

原文:
https://vico-song.blogspot.com/2016/12/centos-6shadowsocks-libev.html

参考Shadowsocks-libev在Github上的说明:
download yum repo on Fedora Copr and put it inside /etc/yum.repos.d/.

在Fedora Copr上下载软件仓库配置文件:
wget https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-6/librehat-shadowsocks-epel-6.repo

repo的内容如下:

[librehat-shadowsocks]
name=Copr repo for shadowsocks owned by librehat
baseurl=https://copr-be.cloud.fedoraproject.org/results/librehat/shadowsocks/epel-6-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/librehat/shadowsocks/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1

 

将配置文件放置到/etc/yum.repos.d/:
mv librehat-shadowsocks-epel-6.repo /etc/yum.repos.d/

然后通过yum安装shadowsocks-libev:
yum update
yum install shadowsocks-libev

如果想把shadowsocks-libev作为服务运行,拷贝启动脚本shadowsocks-libev到/etc/init.d/目录下后,启动:
wget https://cokebar.info/wp-content/uploads/2014/11/shadowsocks-libev
mv shadowsocks-libev /etc/init.d/

然后可以通过以下命令在启动、停止和重启shadowsocks-libev服务:
/etc/init.d/shadowsocks-libev start
/etc/init.d/shadowsocks-libev stop
/etc/init.d/shadowsocks-libev restart

对于shadowsocks-libev有两点需要注意:
1. shadowsocks-libev以服务运行时无法输出日志:
https://github.com/shadowsocks/shadowsocks-libev/issues/174
2. shadowsock-libev不支持python版、go版的多端口配置:
https://github.com/shadowsocks/shadowsocks-libev/issues/5

发表评论

电子邮件地址不会被公开。 必填项已用*标注