Cargo Features

[dependencies]
shadowsocks-rust = { version = "1.18.3", default-features = false, features = ["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", "utility-url-outline", "jemalloc", "tcmalloc-vendored", "snmalloc", "multi-threaded", "stream-cipher", "aead-cipher-extra", "aead-cipher-2022", "aead-cipher-2022-extra", "security-replay-attack-detect", "replay-attack-detect", "mimalloc", "rpmalloc"] }
default = aead-cipher-2022, hickory-dns, local, local-http, local-socks4, local-tunnel, logging, manager, multi-threaded, server, service, utility

These default features are set whenever shadowsocks-rust is added without default-features = false somewhere in the dependency tree.

local default local-dns? local-fake-dns? local-flow-stat? local-http 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 default service

Enable remote server

Enables server of shadowsocks-service

Affects service::server

Required by the ssserver binary

manager default service

Enable manager server

Enables manager of shadowsocks-service

Affects service::manager

Required by the ssmanager binary

utility default = qrcode

Enable utility

Required by the ssurl binary

service default 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 default 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

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

Enables dns-over-https of shadowsocks-service

dns-over-h3

Enables dns-over-h3 of shadowsocks-service

logging default = log4rs, time, tracing, tracing-subscriber

Enable logging output

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

local-dns = 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 default 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 = local-http

Enables local-http-rustls of shadowsocks-service

local-redir = local

Enable REDIR protocol for sslocal
(transparent proxy)

Enables local-redir of shadowsocks-service

local-tunnel default = local

Enable tunnel protocol for sslocal

Enables local-tunnel of shadowsocks-service

local-socks4 default = local

Enable socks4 protocol for sslocal

Enables local-socks4 of shadowsocks-service

local-tun = ipnet, local

Enable Tun interface protocol for sslocal

Enables local-tun of shadowsocks-service

Affects vparser::parse_ipnet

local-fake-dns = local

Enable Fake DNS for sslocal

Enables local-fake-dns 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 default

Enable tokio's multi-threaded runtime

Enables rt-multi-thread of tokio

Affects config::RuntimeConfig.worker_count

stream-cipher

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-extra

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 default

Enable AEAD 2022

Enables aead-cipher-2022 of shadowsocks-service

aead-cipher-2022-extra

Enable AEAD 2022 with extra ciphers

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

security-replay-attack-detect 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
qrcode utility
ipnet 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 not x86 x86_64 arm64 x86 x86_64 arm64 utility-url-outline?