shadowsocks-libev
Intro
Shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and low-end boxes.
It is a port of Shadowsocks created by @clowwindy, and maintained by @madeye and @linusyang.
Current version: 3.1.3 | Changelog
Features
Shadowsocks-libev is written in pure C and depends on libev. It's designed to be a lightweight implementation of shadowsocks protocol, in order to keep the resource usage as low as possible.
For a full list of feature comparison between different versions of shadowsocks, refer to the Wiki page.
Prerequisites
Get the latest source code
To get the latest source code, you should also update the submodules as following:
cd shadowsocks-libev
git submodule update --init --recursive
Build and install with recent libsodium
You have to install libsodium at least 1.0.8, but recommended 1.0.12 or later version before building. See Directly build and install on UNIX-like system.
Installation
Distribution-specific guide
- Debian & Ubuntu
- Install from repository
- Build deb package from source
- Configure and start the service
- Fedora & RHEL
- Build from source with centos
- Install from repository
- Archlinux
- NixOS
- Nix
- Directly build and install on UNIX-like system
- FreeBSD
- OpenWRT
- OS X
- Windows (MinGW)
- Docker
Pre-build configure guide
For a complete list of available configure-time option,
try configure --help.
Debian & Ubuntu
Install from repository
Shadowsocks-libev is available in the official repository for following distributions:
- Debian 8 or higher, including oldstable (jessie), stable (stretch), testing (buster) and unstable (sid)
- Ubuntu 16.10 or higher
sudo apt install shadowsocks-libev
For Debian 8 (Jessie) users, please install it from jessie-backports-sloppy:
We strongly encourage you to install shadowsocks-libev from jessie-backports-sloppy.
For more info about backports, you can refer Debian Backports.
sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports-sloppy main" >> /etc/apt/sources.list.d/jessie-backports.list'
sudo apt update
sudo apt -t jessie-backports-sloppy install shadowsocks-libev
For Debian 9 (Stretch) users, please install it from stretch-backports:
We strongly encourage you to install shadowsocks-libev from stretch-backports.
For more info about backports, you can refer Debian Backports.
sudo apt update
sudo apt -t stretch-backports install shadowsocks-libev
For Ubuntu 14.04 and 16.04 users, please install from PPA:
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y
sudo apt-get update
sudo apt install shadowsocks-libev
Build deb package from source
Supported distributions:
- Debian 8, 9 or higher
- Ubuntu 14.04 LTS, 16.04 LTS, 16.10 or higher
You can build shadowsocks-libev and all its dependencies by script:
cp ./scripts/build_deb.sh ~/build-area/
cd ~/build-area
./build_deb.sh
For older systems, building .deb packages is not supported.
Please try to build and install directly from source. See the Linux section below.
Note for Debian 8 (Jessie) users to build their own deb packages:
We strongly encourage you to install shadowsocks-libev from jessie-backports-sloppy. If you insist on building from source, you will need to manually install libsodium from jessie-backports-sloppy, NOT libsodium in main repository.
For more info about backports, you can refer Debian Backports.
sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
sudo sh -c 'printf "deb http://deb.debian.org/debian jessie-backports-sloppy main" >> /etc/apt/sources.list.d/jessie-backports.list'
sudo apt-get install --no-install-recommends devscripts equivs
mk-build-deps --root-cmd sudo --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
./autogen.sh && dpkg-buildpackage -b -us -uc
cd ..
sudo dpkg -i shadowsocks-libev*.deb
Note for Debian 9 (Stretch) users to build their own deb packages:
We strongly encourage you to install shadowsocks-libev from stretch-backports. If you insist on building from source, you will need to manually install libsodium from stretch-backports, NOT libsodium in main repository.
For more info about backports, you can refer Debian Backports.
sudo sh -c 'printf "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list'
sudo apt-get install --no-install-recommends devscripts equivs
mk-build-deps --root-cmd sudo --install --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
./autogen.sh && dpkg-buildpackage -b -us -uc
cd ..
sudo dpkg -i shadowsocks-libev*.deb
Configure and start the service
# Edit the configuration file
sudo vim /etc/shadowsocks-libev/config.json
# Edit the default configuration for debian
sudo vim /etc/default/shadowsocks-libev
# Start the service
sudo /etc/init.d/shadowsocks-libev start # for sysvinit, or
sudo systemctl start shadowsocks-libev # for systemd
Fedora & RHEL
Supported distributions:
- Recent Fedora versions (until EOL)
- RHEL 6, 7 and derivatives (including CentOS, Scientific Linux)
Build from source with centos
If you are using CentOS 7, you need to install these prequirement to build from source code:
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y
Install from repository
Enable repo via dnf:
su -c 'dnf copr enable librehat/shadowsocks'