python /var/www/html/shadowsocks-2.9.1/shadowsocks/server.py -q -c /etc/shadowsocks-aes.json --plugin obfs-server --plugin-opts "obfs=http"

/usr/local/shadowsocks-libev/bin/ss-server -c /etc/shadowsocks-libev.json $DAEMON_ARGSCapabilityBoundingSet=CAP_NET_BIND_SERVICE

echo flush_all | nc dev-chope-bj-mc.ahu7k2.cfg.cnn1.cache.amazonaws.com.cn 11211

编译环境准备、解决依赖
yum install epel-release -y
yum install gettext gcc pcre-devel autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel

如果报错
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

https://www.regskynet.com/232.html

安装 Libsodium

cd /usr/local/src
wget https://loukky.com/files/libsodium-1.0.16.tar.gz
tar xvf libsodium-1.0.16.tar.gz
pushd libsodium-1.0.16
./configure --prefix=/usr && make
make install
popd
ldconfig

安装 MbedTLS

cd /usr/local/src
wget https://loukky.com/files/mbedtls-2.16.0-gpl.tgz
tar xvf mbedtls-2.16.0-gpl.tgz
pushd mbedtls-2.16.0
make SHARED=1 CFLAGS=-fPIC
make DESTDIR=/usr install

如果报错
File "scripts/generate_test_code.py", line 949

with open(helpers_file, 'r') as help_f, open(platform_file, 'r') as \
                                      ^

SyntaxError: invalid syntax
make[1]: * [test_suite_aes.cbc.c] Error 1
make: * [tests] Error 2

https://www.regskynet.com/231.html

升级python

https://www.regskynet.com/211.html

popd
ldconfig

Shadowsocks-libev 源码
cd /usr/local/src
git clone https://github.com/shadowsocks/shadowsocks-libev.git

如果报错

fatal: unable to access 'https://github.com/shadowsocks/shadowsocks-libev.git/': SSL connect error

参考

https://www.regskynet.com/233.html

cd shadowsocks-libev
git submodule update --init --recursive

开始编译 Shadowsocks-libev
cd /usr/local/src/shadowsocks-libev
./autogen.sh

如果报错
configure.ac:4: error: Autoconf version 2.67 or higher is required
configure.ac:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63

https://www.regskynet.com/230.html

./configure --prefix=/usr/local/shadowsocks-libev
make

https://www.regskynet.com/231.html

make install

安装 Simple-obfs
cd /usr/local/src
git clone https://github.com/shadowsocks/simple-obfs.git
cd simple-obfs
git submodule update --init --recursive
./autogen.sh
./configure
make

如果提示

local.h:26:16: error: ev.h: No such file or directory

解决

https://www.regskynet.com/234.html

make install

新建配置文件,加入simple-obfs支持

vim /etc/shadowsocks-libev.json

{

"server": "0.0.0.0",
"server_port": "8880",
"local_port": 1080,
"password": "passwd123",
"timeout":  600,
"method": "aes-256-cfb",
"plugin": "obfs-server",
"plugin_opts": "obfs=http"

}

加密方式有一下几种,任选一种:
rc4-md5, aes-128-gcm, aes-192-gcm, aes-256-gcm, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-ctr, aes-192-ctr, aes-256-ctr, camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, bf-cfb, chacha20-ietf-poly1305, xchacha20-ietf-poly1305, salsa20, chacha20, chacha20-ietf, chacha20-ietf-poly1305

[program:shadowsocks-libev]
user = root
autostart = true
autorestart = true
startsecs = 10
stderr_logfile = /var/log/shadowsocks-libev_err.log
stdout_logfile = /var/log/shadowsocks-libev.log
command = /usr/local/shadowsocks-libev/bin/ss-server -c /etc/shadowsocks-libev.json $DAEMON_ARGSCapabilityBoundingSet=CAP_NET_BIND_SERVICE

/usr/local/shadowsocks-libev/bin/ss-server -c /etc/shadowsocks-libev.json $DAEMON_ARGSCapabilityBoundingSet=CAP_NET_BIND_SERVICE

error while loading shared libraries: libmbedcrypto.so.3: cannot open shared object file: No such file or directory

ln -s /usr/lib64/libmbedcrypto.so.1 /usr/lib64/libmbedcrypto.so.0

80
8080
8880
2052
2082
2086
2095

参考文章
https://loukky.com/archives/96

Last modification:November 30th, 2019 at 12:02 pm