Baike.dev
All toolsTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
S

shadowsocks-libev

> 编程语言
开源

Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust

16.2K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust

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.3.6 | 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.

Quick Start

Snap is the recommended way to install the latest binaries.

Install snap core

https://snapcraft.io/core

Install from snapcraft.io

Stable channel:

sudo snap install shadowsocks-libev

Edge channel:

sudo snap install shadowsocks-libev --edge

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
  • Archlinux & Manjaro
  • NixOS
  • Nix
  • Directly build and install on UNIX-like system
  • FreeBSD
    • Install
    • Configuration
    • Run
    • Run as client
  • OpenWRT
  • OS X
  • Windows (MinGW)
  • Docker

Build from source (CMake)

shadowsocks-libev uses CMake as its sole build system. Start by pulling submodules:

git submodule update --init --recursive

Then build:

mkdir -p build && cd build
cmake ..
make
sudo make install

To run unit tests:

cd build
ctest --output-on-failure

CMake options

For a complete list of available options, run cmake -LH from a build directory. Commonly used options:

Option Default Description -DWITH_EMBEDDED_SRC=OFF ON Use system libcork/libipset/libbloom instead of bundled submodules -DWITH_DOC_MAN=OFF ON Skip man page generation (removes asciidoc/xmlto dependency) -DBUILD_TESTING=OFF ON Disable unit tests -DENABLE_CONNMARKTOS=ON OFF Linux netfilter conntrack QoS support -DENABLE_NFTABLES=ON OFF nftables firewall integration

On macOS, if libraries are installed via Homebrew, specify paths:

cmake .. -DCMAKE_PREFIX_PATH="/usr/local/opt/mbedtls;/usr/local/opt/libsodium"

Debian & Ubuntu

Install from repository (not recommended)

Shadowsocks-libev is available in the official repository for following distributions:

  • Debian 8 or higher, including oldoldstable (jessie), old stable (stretch), stable (buster), testing (bullseye) and unstable (sid)
  • Ubuntu 16.10 or higher
sudo apt update
sudo apt install shadowsocks-libev

Build deb package from source

You can build shadowsocks-libev and all its dependencies by script:

mkdir -p ~/build-area/
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.

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 prerequirements to build from source code:

yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y

Archlinux & Manjaro

sudo pacman -S shadowsocks-libev

Please refer to downstream PKGBUILD script for extra modifications and distribution-specific bugs.

NixOS

nix-env -iA nixos.shadowsocks-libev

Nix

nix-env -iA nixpkgs.shadowsocks-libev

Linux

In general, you need the following build dependencies:

  • cmake (>= 3.2)
  • a C compiler (gcc or clang)
  • pkg-config
  • libmbedtls
  • libsodium (>= 1.0.4)
  • libpcre2
  • libev
  • libc-ares
  • asciidoc (for documentation only)
  • xmlto (for documentation only)

If your system is too old to provide libmbedtls and libsodium (>= 1.0.4), you will need to either install those libraries manually or upgrade your system.

Install build dependencies for your distribution:

# Debian / Ubuntu
sudo apt-get install --no-install-recommends build-essential cmake pkg-config \
    libpcre2-dev libev-dev libc-ares-dev libmbedtls-dev libsodium-dev \
    asciidoc xmlto

# CentOS / Fedora / RHEL
sudo yum install gcc cmake make pkg-config pcre2-devel c-ares-devel \
    libev-devel libsodium-devel mbedtls-devel asciidoc xmlto

# Arch
sudo pacman -S gcc cmake make pkg-config pcre2 c-ares libev libsodium mbedtls \
    asciidoc xmlto

Then build and install:

git submodule update --init --recursive
mkdir -p build && cd build
cmake ..
make
sudo make install

FreeBSD

Install

Shadowsocks-libev is available in FreeBSD Ports Collection. You can install it in either way, pkg or ports.

pkg (recommended)

pkg install shadowsocks-libev

ports

cd /usr/ports/net/shadowsocks-libev
make install

Configuration

Edit your config.json file. By default, it's located in /usr/local/etc/shadowsocks-libev.

To enable shadowsocks-libev, add the following rc variable to your /etc/rc.conf file:

shadowsocks_libev_enable="YES"

Run

Start the Shadowsocks server:

service shadowsocks_libev start

Run as client

By default, shadowsocks-libev is running as a server in FreeBSD. If you would like to start shadowsocks-libev in client mode, you can modify the rc script (/usr/local/etc/rc.d/shadowsocks_libev) manually.

# modify the following line from "ss-server" to "ss-local"
command="/usr/local/bin/ss-local"

Note that is simply a workaround, each time you upgrade the port your changes will be overwritten by the new version.

OpenWRT

The OpenWRT project is maintained here: openwrt-shadowsocks.

OS X

For OS X, use Homebrew to install or build.

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install shadowsocks-libev:

brew install shadowsocks-libev

Windows (MinGW)

To build Windows native binaries, the recommended method is to use Docker:

  • On Windows: double-click make.bat in docker\mingw

  • On Unix-like system:

      cd shadowsocks-libev/docker/mingw
      make
    

A tarball with 32-bit and 64-bit binaries will be generated in the same directory.

You could also manually use MinGW-w64 compilers to build in Unix-like shell (MSYS2/Cygwin), or cross-compile on Unix-like systems (Linux/MacOS). Please refer to build scripts in docker/mingw.

Currently you need to use a patched libev library for MinGW:

  • https://github.com/shadowsocks/libev/archive/mingw.zip

Notice that TCP Fast Open (TFO) is only available on Windows 10, 1607 or later version (precisely, build >= 14393). If you are using 1709 (build 16299) or later version, you also need to run the following command in PowerShell/Command Prompt as Administrator and reboot to use TFO properly:

    netsh int tcp set global fastopenfallback=disabled

Docker

As you expect, simply pull the image and run.

docker pull shadowsocks/shadowsocks-libev
docker run -e PASSWORD=<password> -p<server-port>:8388 -p<server-port>:8388/udp -d shadowsocks/shadowsocks-libev

More information about the image can be found here.

Usage

For a detailed and complete list of all supported arguments, you may refer to the man pages of the applications, respectively.

ss-[local|redir|server|tunnel|manager]

   -s <server_host>           Host name or IP address of your remote server.

   -p <server_port>           Port number of your remote server.

   -l <local_port>            Port number of your local server.

   -k <password>              Password of your remote server.

   -m <encrypt_method>        Encrypt method:
                              2022-blake3-aes-128-gcm,
                              2022-blake3-aes-256-gcm,
                              2022-blake3-chacha20-poly1305,
                              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 and chacha20-ietf.
                              The default cipher is chacha20-ietf-poly1305.

                              The 2022-blake3-* ciphers implement
                              Shadowsocks 2022 (SIP022) and are the
                              recommended choice. They take a
                              base64-encoded pre-shared key of exactly
                              the cipher's key size via -k, not a
                              password: generate one with
                              `openssl rand -base64 32` (or 16 for
                              2022-blake3-aes-128-gcm).

   [--server-url <ss_url>]    Take the server address, port, cipher,
                              password and SIP003 plugin from a single
                              ss:// URL (SIP002 or the legacy form).
                              ss-local only. Options given later on the
                              command line override the URL's values.

   [-a <user>]                Run as another user.

   [-f <pid_file>]            The file path to store pid.

   [-t <timeout>]             Socket timeout in seconds.

   [-c <config_file>]         The path to config file.

   [-n <number>]              Max number of open files.

   [-i <interface>]           Network interface to bind.
                              (not available in redir mode)

   [-b <local_address>]       Local address to bind.
                              For servers: Specify the local address to use 
                              while this server is making outbound 
                              connections to remote servers on behalf of the
                              clients.
                              For clients: Specify the local address to use

核心特点

  • •Debian & Ubuntu
  • •Install from repository
  • •Build deb package from source
  • •Configure and start the service
  • •Fedora & RHEL
  • •Build from source with centos
  • •Archlinux & Manjaro
  • •Directly build and install on UNIX-like system
  • •Configuration
  • •Run as client

> 标签

Ccshadowsocks

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月9日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

  • Home
  • All tools
  • Trending
  • Open source

About

  • About us
  • Community
  • News

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools