Cargo Features

[dependencies]
shadowsocks-rust = { version = "1.22.0", default-features = false, features = ["basic", "full", "full-extra", "local", "server", "manager", "utility", "service", "winservice", "hickory-dns", "trust-dns", "dns-over-tls", "dns-over-native-tls", "dns-over-native-tls-vendored", "dns-over-https", "dns-over-h3", "logging", "local-dns", "local-flow-stat", "local-http", "local-http-native-tls", "local-http-native-tls-vendored", "local-http-rustls", "local-redir", "local-tunnel", "local-socks4", "local-tun", "local-fake-dns", "local-online-config", "utility-url-outline", "jemalloc", "tcmalloc-vendored", "snmalloc", "multi-threaded", "stream-cipher", "aead-cipher", "aead-cipher-extra", "aead-cipher-2022", "aead-cipher-2022-extra", "security-replay-attack-detect", "replay-attack-detect", "mimalloc", "rpmalloc"] }
default = full

The full feature is set by default whenever shadowsocks-rust is added without default-features = false somewhere in the dependency tree.

basic = aead-cipher, hickory-dns, local, logging, multi-threaded, server

Basic Features

full default full-extra? = aead-cipher, aead-cipher-2022, dns-over-https, dns-over-tls, hickory-dns, local, local-dns, local-fake-dns, local-http, local-http-rustls, local-online-config, local-redir, local-socks4, local-tun, local-tunnel, logging, manager, multi-threaded, server, service, stream-cipher, utility

All Suggested Features

full-extra = aead-cipher-2022-extra, aead-cipher-extra, dns-over-h3, full, security-replay-attack-detect

Full features with extra (non-stable)

local basic? full local-dns? local-fake-dns? local-flow-stat? local-http? local-online-config? local-redir? local-socks4? local-tun? local-tunnel? service?

Enable local server

Enables local of shadowsocks-service

Affects service::local

Required by the sslocal binary

server basic? full service?

Enable remote server

Enables server of shadowsocks-service

Affects service::server

Required by the ssserver binary

manager full service?

Enable manager server

Enables manager of shadowsocks-service

Affects service::manager

Required by the ssmanager binary

utility full = qrcode

Enable utility

Required by the ssurl binary

service full winservice? = local, manager, server

Enable service

Required by the ssservice binary

winservice = service, windows-service

Enable Windows Service

Required by the sswinservice binary

hickory-dns basic? full trust-dns?

Enables Hickory-DNS for replacing tokio's builtin DNS resolver

Enables hickory-dns of shadowsocks-service

trust-dns = hickory-dns

Hickory-DNS was renamed from Trust-DNS, keep compatibility.

dns-over-tls full

Enables dns-over-tls of shadowsocks-service

dns-over-native-tls

Enables dns-over-native-tls of shadowsocks-service

dns-over-native-tls-vendored

Enables dns-over-native-tls-vendored of shadowsocks-service

dns-over-https full

Enables dns-over-https of shadowsocks-service

dns-over-h3 full-extra?

Enables dns-over-h3 of shadowsocks-service

logging basic? full = log4rs, time, tracing, tracing-subscriber

Enable logging output

Affects config::Config.log, config::LogConfig, config::LogFormatConfig, shadowsocks-rust::logging

local-dns full = local

Enable DNS-relay

Enables local-dns of shadowsocks-service

local-flow-stat = local

Enable client flow statistic report
Currently is only used in Android

Enables local-flow-stat of shadowsocks-service

local-http full local-http-native-tls? local-http-native-tls-vendored? local-http-rustls? = local

Enable HTTP protocol for sslocal

Enables local-http of shadowsocks-service

local-http-native-tls = local-http

Enables local-http-native-tls of shadowsocks-service

local-http-native-tls-vendored = local-http

Enables local-http-native-tls-vendored of shadowsocks-service

local-http-rustls full = local-http

Enables local-http-rustls of shadowsocks-service

local-redir full = local

Enable REDIR protocol for sslocal
(transparent proxy)

Enables local-redir of shadowsocks-service

local-tunnel full = local

Enable tunnel protocol for sslocal

Enables local-tunnel of shadowsocks-service

local-socks4 full = local

Enable socks4 protocol for sslocal

Enables local-socks4 of shadowsocks-service

local-tun full = ipnet, local

Enable Tun interface protocol for sslocal

Enables local-tun of shadowsocks-service

Affects vparser::parse_ipnet

local-fake-dns full = ipnet, local

Enable Fake DNS for sslocal

Enables local-fake-dns of shadowsocks-service

Affects vparser::parse_ipnet

local-online-config full = local, mime

sslocal support online URL (SIP008 Online Configuration Delivery) https://shadowsocks.org/doc/sip008.html

Enables local-online-config of shadowsocks-service

utility-url-outline = reqwest

ssurl support outline (ssconf) URL

jemalloc = jemallocator

Enable jemalloc for binaries

tcmalloc-vendored

Enable bundled tcmalloc

Enables bundled of tcmalloc

snmalloc = snmalloc-rs

Enable snmalloc for binaries

multi-threaded basic? full

Enable tokio's multi-threaded runtime

Enables rt-multi-thread of tokio

Affects config::RuntimeConfig.worker_count

stream-cipher full

Enable Stream Cipher Protocol WARN: Stream Cipher Protocol is proved to be insecure https://github.com/shadowsocks/shadowsocks-rust/issues/373 Users should always avoid using these ciphers in practice

Enables stream-cipher of shadowsocks-service

aead-cipher aead-cipher-extra? basic? full

Enable AEAD ciphers

Enables aead-cipher of shadowsocks-service

aead-cipher-extra full-extra? = aead-cipher

Enable extra AEAD ciphers
WARN: These non-standard AEAD ciphers are not officially supported by shadowsocks community

Enables aead-cipher-extra of shadowsocks-service

aead-cipher-2022 full

Enable AEAD 2022

Enables aead-cipher-2022 of shadowsocks-service

aead-cipher-2022-extra full-extra?

Enable AEAD 2022 with extra ciphers

Enables aead-cipher-2022-extra of shadowsocks-service

security-replay-attack-detect full-extra? replay-attack-detect?

Enable detection against replay attack (Stream / AEAD)

Enables security-replay-attack-detect of shadowsocks-service

replay-attack-detect = security-replay-attack-detect

Backward compatibility. DO NOT USE.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

log4rs logging?
tracing logging?
tracing-subscriber logging?
time logging?
mime local-online-config?
qrcode utility?
ipnet local-fake-dns? local-tun?
mimalloc implicit feature

Enables mimalloc

mimalloc:

Performance and security oriented drop-in allocator

tcmalloc tcmalloc-vendored?
jemallocator jemalloc?
snmalloc-rs snmalloc?
rpmalloc implicit feature

Enables rpmalloc

rpmalloc:

Cross-platform global memory allocator using rpmalloc

windows-service winservice?
reqwest x86 x86_64 arm64 not x86 x86_64 arm64 utility-url-outline?