shadowsocks-libev 信息
1 2 3 4 5 6 $ ss-server -h $ ss-local、ss-manager、ss-nat、ss-redir、ss-server、ss-tunnel
1 2 3 4 5 6 cloudfront.com cloudflare.com itunes.apple.com www.icloud.com ajax.microsoft.com apps.bdimg.com
编译安装
libsodium
、mbedtls
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #!/bin/bash yum update -y yum install -y pcre pcre-devel git gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel export LIBSODIUM_VER=1.0.13wget 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 export MBEDTLS_VER=2.6.0wget 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
1 2 3 4 5 6 7 8 9 10 11 12 13 rm -rf /tmp/shadowsocks-libevcd /tmpgit clone https://github.com/shadowsocks/shadowsocks-libev.git cd shadowsocks-libevgit submodule update --init --recursive ./autogen.sh ./configure make make install cd ..rm -rf /tmp/shadowsocks-libev
1 2 3 $ mkdir -p /etc/shadowsocks-libev $ vi /etc/shadowsocks-libev/config.json $ vi /var/lib/snapd/snap/shadowsocks-libev/
1 2 3 4 5 6 7 8 9 { "server" : "ip" , "server_port" : 9999 , "password" : "xxx" , "local_port" : 1080 , "timeout" : 60 , "method" : "rc4-md5" , “fast_open”: false }
vi /etc/default/shadowsocks-libev
1 2 3 4 5 6 7 8 9 10 11 START=yes CONFFILE="/etc/shadowsocks-libev/config.json" DAEMON_ARGS="-u" USER=nobody GROUP=nobody MAXFD=32768
vi /etc/systemd/system/shadowsocks-libev.service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [Unit] Description=Shadowsocks-libev Default Server Service Documentation=man:shadowsocks-libev(8) After=network.target [Service] Type=simple EnvironmentFile=/etc/default/shadowsocks-libev User=nobody Group=nobody LimitNOFILE=32768 ExecStart=/usr/local/bin/ss-server -c $CONFFILE $DAEMON_ARGS [Install] WantedBy=multi-user.target
1 2 3 4 $ systemctl daemon-reload $ systemctl enable shadowsocks-libev.service $ systemctl start shadowsocks-libev.service $ systemctl status shadowsocks-libev.service
1 $ systemctl stop shadowsocks-libev.service
在 shadowsocks-libev 目录下:
1 2 3 4 5 6 7 8 9 10 删除文件夹直接重新编译就好了 $ make uninstall //卸载 $ git pull $ git submodule update –init –recursive $ make clean //读取 Makefile 中关于 clean 的工作,清除编译过的目标文件 (*.o) $ ./autogen.sh $ ./configure $ make $ make install $ ss-server -h //查看版本信息
yum 安装 Repository https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/
源 https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 $ wget https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo $ cp librehat-shadowsocks-epel-7.repo /etc/yum.repos.d/ $ yum update $ yum install -y shadowsocks-libev $ cd /etc/yum.repos.d/ $ curl -O https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo $ yum update $ yum install -y shadowsocks-libev $ systemctl start shadowsocks-libev.service $ systemctl enable shadowsocks-libev.service $ systemctl status shadowsocks-libev
snap 安装
1 2 3 4 $ sudo yum install epel-release $ sudo yum install snapd $ sudo systemctl enable --now snapd.socket $ sudo ln -s /var/lib/snapd/snap /snap
1 2 $ sudo snap install core $ sudo snap install shadowsocks-libev --edge
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $ shadowsocks-libev.ss-server -h 配置文件放在此目录下,否则出错 $ vi /etc/systemd/system/shadowsocks-libev.service [Unit] Description=Shadowsocks [Service] TimeoutStartSec=0 ExecStart=/var/lib/snapd/snap/bin/shadowsocks-libev.ss-server -c /var/lib/snapd/snap/shadowsocks-libev/config.json -u [Install] WantedBy=multi-user.target $ systemctl daemon-reload $ systemctl enable shadowsocks-libev.service $ systemctl start shadowsocks-libev.service $ systemctl status shadowsocks-libev.service
docker 运行 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 mkdir -p /etc/shadowsocks-libevnano /etc/shadowsocks-libev/config.json { "server" :"0.0.0.0" , "server_port" :13663, "password" :"FXvZ8vjGNB" , "timeout" :300, "method" :"aes-256-gcm" , "fast_open" :false , "nameserver" :"8.8.8.8" , "mode" :"tcp_and_udp" , "plugin" :"obfs-server" , "plugin_opts" :"obfs=tls" } $ docker run -d -p 13663:13663 -p 13663:13663/udp --name ss-libev --restart=always -v /etc/shadowsocks-libev:/etc/shadowsocks-libev teddysun/shadowsocks-libev