注意:如果你是新装好的 VPS 请先更新源和软件后再开始操作。
Ubuntu 更新源和软件
sudo apt-get update && sudo apt-get upgrade
Ubuntu 14.04 和 Ubuntu 16.04 用户需新增 PPA 源
sudo apt-get install software-properties-common && sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev && sudo apt-get update
sudo apt install shadowsocks-libev
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libc-ares-dev libev-dev asciidoc xmlto automake git
git clone https://github.com/shadowsocks/simple-obfs.git
cd simple-obfs
git submodule update --init --recursive
./autogen.sh
./configure && make
sudo make install
cd ..
rm -rf simple-obfs
编辑配置文件
sudo vim /etc/shadowsocks-libev/config.json
配置文件
{
"server":"0.0.0.0",
"server_port":8443,
"local_port":1080,
"password":"FuckGFW",
"timeout":60,
"method":"chacha20-ietf-poly1305",
"plugin":"obfs-server",
"plugin_opts":"obfs=tls;obfs-host=yunjiasu-cdn.net"
}
主要修改以下:
「server」的值改成「”0.0.0.0″」
「server_port」的值改成你自定义的端口
「password」的值改成你自定义的密码
另外出于安全的考虑目前仅推荐使用 AEAD 算法:
- chacha20-ietf-poly1305
- aes-256-gcm
- aes-192-gcm
- aes-128-gcm
运行及开机启动
sudo systemctl start shadowsocks-libev
sudo systemctl enable shadowsocks-libev
最后说明一点,OBFS 的作用是应对运营商的 QOS,默认情况下不建议开启。
声明:
本文转自diveng(神机网)
原文链接:https://diveng.io/ubuntu-server-install-shadowsocks-libev-and-simple-obfs.html