Cargo Features

shadowsocks-service has no features set by default.

[dependencies]
shadowsocks-service = { version = "1.21.2", features = ["full", "local", "server", "manager", "hickory-dns", "trust-dns", "dns-over-tls", "dns-over-native-tls", "dns-over-native-tls-vendored", "dns-over-https", "dns-over-h3", "local-dns", "local-dns-relay", "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", "stream-cipher", "aead-cipher-extra", "aead-cipher-2022", "aead-cipher-2022-extra", "security-replay-attack-detect"] }
full = hickory-dns, local, local-http, local-redir, local-socks4, local-tunnel, manager, server
local full? local-dns? local-fake-dns? local-flow-stat? local-http? local-online-config? local-redir? local-socks4? local-tun? local-tunnel? = httparse

Enable local server

Affects config::LocalConfig.socks5_auth, shadowsocks-service::local

server full? manager?

Enable remote server

Affects shadowsocks-service::server

manager full? = server

Enable manager server

Affects shadowsocks-service::manager

hickory-dns dns-over-h3? dns-over-https? dns-over-native-tls? dns-over-native-tls-vendored? dns-over-tls? full? local-dns? trust-dns? = hickory-resolver

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

Enables trust-dns of shadowsocks

trust-dns local-fake-dns? = hickory-dns

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

dns-over-tls = hickory-dns

Enables dns-over-rustls, dns-over-tls, native-certs and webpki-roots of hickory-resolver

dns-over-native-tls = hickory-dns

Enables dns-over-native-tls and dns-over-tls of hickory-resolver

dns-over-native-tls-vendored = hickory-dns

Enables dns-over-native-tls and dns-over-tls of hickory-resolver, vendored of native-tls

dns-over-https = hickory-dns

Enables dns-over-https, dns-over-https-rustls, native-certs and webpki-roots of hickory-resolver

dns-over-h3 = hickory-dns

Enables dns-over-h3 of hickory-resolver

local-dns local-dns-relay? = hickory-dns, local

Enable DNS-relay

Affects config::LocalConfig.local_dns_addr, config::LocalConfig.remote_dns_addr, config::LocalConfig.client_cache_size, local::dns

local-dns-relay = local-dns

Backward compatibility, DO NOT USE

local-flow-stat = local

Enable client flow statistic report
Currently is only used in Android

Affects config::LocalFlowStatAddress, config::Config.local_stat_addr

local-http full? local-http-native-tls? local-http-rustls? local-online-config? = http, http-body-util, hyper, local

Enable HTTP protocol for sslocal

Affects local::http

local-http-native-tls local-http-native-tls-vendored? = local-http, native-tls, tokio-native-tls
local-http-native-tls-vendored = local-http-native-tls

Enables vendored of native-tls and tokio-native-tls

local-http-rustls = local-http, rustls-native-certs, tokio-rustls, webpki-roots
local-redir full? = local

Enable REDIR protocol for sslocal
(transparent proxy)

Affects config::LocalConfig.tcp_redir, config::LocalConfig.udp_redir, local::redir

local-tunnel full? = local

Enable tunnel protocol for sslocal

Affects config::LocalConfig.forward_addr, local::tunnel

local-socks4 full? = local

Enable socks4 protocol for sslocal

Affects client::socks4, socks::socks4

local-tun = etherparse, local, smoltcp, tun2

Enable Tun interface protocol for sslocal

Affects config::LocalConfig.tun_interface_name, config::LocalConfig.tun_interface_address, config::LocalConfig.tun_interface_destination, config::LocalConfig.tun_device_fd, config::LocalConfig.tun_device_fd_from_path, local::tun

local-fake-dns = bson, local, sled, trust-dns

Enable Fake DNS

Affects config::LocalConfig.fake_dns_record_expire_duration, config::LocalConfig.fake_dns_ipv4_network, config::LocalConfig.fake_dns_ipv6_network, config::LocalConfig.fake_dns_database_path, local::fake_dns

local-online-config = brotli, flate2, http, local, local-http, mime, zstd

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

Affects config::OnlineConfig, config::Config.online_config, local::online_config

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

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

aead-cipher-2022

Enable AEAD 2022

Enables aead-cipher-2022 of shadowsocks

aead-cipher-2022-extra

Enable AEAD 2022 with extra ciphers

Enables aead-cipher-2022-extra of shadowsocks

security-replay-attack-detect

Enable detection against replay attack

Enables security-replay-attack-detect of shadowsocks

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.

sled local-fake-dns?
tokio-native-tls local-http-native-tls? local-http-native-tls-vendored?
native-tls dns-over-native-tls-vendored? local-http-native-tls? local-http-native-tls-vendored?
webpki-roots local-http-rustls?
tokio-rustls local-http-rustls?
rustls-native-certs local-http-rustls?
hyper local-http?
http-body-util local-http?
http local-http? local-online-config?
httparse local?
hickory-resolver dns-over-h3? dns-over-https? dns-over-native-tls? dns-over-native-tls-vendored? dns-over-tls? hickory-dns?
mime local-online-config?
flate2 local-online-config?
brotli local-online-config?
zstd local-online-config?
tun2 local-tun?

Enables tun2 ^3.1

etherparse local-tun?
smoltcp local-tun?

Enables smoltcp ^0.11

bson local-fake-dns?