狐讯

我是一只小狐狸,来撩我呀

Debian/Ubuntu Shadowsocks-libev编译安装

0 评

修改时区

dpkg-reconfigure tzdata

更新软件

apt-get update && apt-get upgrade

安装编译依赖组件

apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev git supervisor socat curl sudo

安装Libsodium

export LIBSODIUM_VER=1.0.15
wget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz
tar xvf libsodium-$LIBSODIUM_VER.tar.gz
pushd libsodium-$LIBSODIUM_VER
./configure --prefix=/usr && make
make install
popd
ldconfig

安装MbedTLS

export MBEDTLS_VER=2.6.0
wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz
tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz
pushd mbedtls-$MBEDTLS_VER
make SHARED=1 CFLAGS=-fPIC
make DESTDIR=/usr install
popd
ldconfig

编译安装Shadowsocks-libev

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

启动 添加配置文件

nano /etc/shadowsocks-libev/config.json

格式说明

{
    "server":"0.0.0.0",
    "server_port":8388,
    "local_port":1080,
    "password":"password",
    "timeout":60,
    "method":"chacha20-ietf-poly1305"
}

设置开机自启 添加配置文件

nano /etc/supervisor/conf.d/ss-server.conf

格式说明

[program:ss-server] 
command=ss-server -c /etc/shadowsocks-libev/config.json -u
autorestart=true  
user=root  

重启 Supervisor

supervisorctl reload

安装TCP BBR 改进版/增强版

使用前,请确认能够开启BBR,直接执行此命令进行开启。

wget --no-check-certificate -qO 'BBR.sh' 'https://moeclub.org/attachment/LinuxShell/BBR.sh' && chmod a+x BBR.sh && bash BBR.sh -f v4.11.9

一键安装TCP BBR 改进版/增强版

wget --no-check-certificate -qO 'BBR_POWERED.sh' 'https://moeclub.org/attachment/LinuxShell/BBR_POWERED.sh' && chmod a+x BBR_POWERED.sh && bash BBR_POWERED.sh -f v4.11.9

修复关联

apt --fix-broken install

发表评论
撰写评论