CentOS 7 配置Shadowsocks-libev + simple-obfs

首先,更新系统:

yum update

编译和安装 ss-libev
安装一些必要的软件:

yum install git vim wget -y
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y

下载 shadowsocks-libev 的源代码:

git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
git submodule update --init --recursive

开始进行编译:

./autogen.sh && ./configure --prefix=/usr && make
make install

编译和安装 simple-obfs

安装一些必要的软件:

yum install zlib-devel openssl-devel -y

安装 simple-obfs

git clone https://github.com/shadowsocks/simple-obfs.git
cd simple-obfs
git submodule update --init --recursive
./autogen.sh
./configure && make
make install

配置

建立配置文件:

mkdir -p /etc/shadowsocks-libev
vim /etc/shadowsocks-libev/config.json

按i粘贴,:wq保存退出

{
  "server": "0.0.0.0",
  "server_port": 443,
  "local_port": 1080,
  "password": "*******",
  "timeout": 100,
  "method": "chacha20-ietf-poly1305",
  "mode": "tcp_and_udp",
  "fast_open": true,
  "plugin": "obfs-server",
  "plugin_opts": "obfs=tls"
}

设置开机自动启动

vim /etc/systemd/system/shadowsocks.service

按i粘贴,:wq保存退出

[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -u
Restart=on-abort
[Install]
WantedBy=multi-user.target

启动服务

systemctl enable shadowsocks
systemctl start shadowsocks

查看启动状态

systemctl status shadowsocks

客户端配置

插件:obfs-local
插件选项:obfs=tls;obfs-host=www.baidu.com

本文链接:

http://www.heylc.com/code/3.html
2 + 4 =
3 评论
    LINC 博主 Chrome 78 OSX
    11月6日   回复

    测试评论

    陈小梦 Chrome 78 OSX
    11月6日   回复

    测试测试!!!

      LINC 博主 Chrome 78 OSX
      11月6日   回复

      @陈小梦 测试测试