Files
shoes/Cargo.toml
T
cfal 1e02a9887b Add retention and reload lifetime regressions (#218)
Catch resource retention across failed setup, cancellation, reloads, and owner destruction with allocation, task, descriptor, and permit regressions, alongside deterministic matcher invariants. Strengthen reload measurements with committed-upstream verification, exact-byte live-session checks, bounded cleanup, and byte-exact provenance, and add the coverage to CI.
2026-10-24 22:53:56 -04:00

208 lines
6.5 KiB
TOML

[package]
name = "shoes"
version = "0.3.4"
publish = false # Cargo strips fork patches from crates.io packages.
edition = "2024"
rust-version = "1.95"
autotests = false
autobenches = false
license = "MIT"
description = "A multi-protocol proxy server."
homepage = "https://github.com/cfal/shoes/"
repository = "https://github.com/cfal/shoes/"
readme = "README.md"
keywords = ["proxy", "proxy-server", "shadowsocks", "v2ray", "vmess"]
categories = ["command-line-utilities", "network-programming"]
[workspace]
members = ["tests/support"]
resolver = "3"
[patch.crates-io]
rustls = { git = "https://github.com/cfal/rustls", rev = "d17d0fc304c03fe6e2c96ade6cd39c33b951c3af" }
blake3 = { git = "https://github.com/cfal/BLAKE3", rev = "cd98c1c4112ed3b2cf2140e1844f266b3d665b53" }
h3 = { git = "https://github.com/cfal/h3", rev = "a0a7a53a143798d71884df36cfac4dd36cd087e6" }
h3-quinn = { git = "https://github.com/cfal/h3", rev = "a0a7a53a143798d71884df36cfac4dd36cd087e6" }
# Includes nix-rust/nix#2821 for iOS socket feature compatibility.
nix = { git = "https://github.com/nix-rust/nix", rev = "3eae6d68ec6382fef7b38cd58f97458e59a71af9" }
# Preserves TCP ACK sequences during retransmission.
smoltcp = { git = "https://github.com/cfal/smoltcp", rev = "a80fa50dce926117669ef061f55f4d6bdad0904a" }
[lib]
name = "shoes"
# rlib = Rust library (for Rust dependencies)
# cdylib = C dynamic library (.so on Linux/Android, .dylib on macOS)
# staticlib = C static library (.a) - required for iOS
crate-type = ["rlib", "cdylib", "staticlib"]
[[bin]]
name = "shoes"
path = "src/main.rs"
[features]
default = []
ffi = [] # Enable FFI module for non-Android builds
integration-tests = []
optional-peer-tests = ["integration-tests"]
external-network-tests = ["integration-tests"]
privileged-tests = ["integration-tests"]
stress-tests = ["integration-tests"]
[[test]]
name = "process_contract"
path = "tests/process_contract.rs"
[[test]]
name = "rule_allocation"
path = "tests/rule_allocation.rs"
[[test]]
name = "retention_allocation"
path = "tests/retention_allocation.rs"
[[test]]
name = "matcher_invariants"
path = "tests/matcher_invariants.rs"
[[test]]
name = "integration"
path = "tests/integration.rs"
required-features = ["integration-tests"]
[[test]]
name = "external_network"
path = "tests/external_network.rs"
required-features = ["external-network-tests"]
[[test]]
name = "optional_peer"
path = "tests/optional_peer.rs"
required-features = ["optional-peer-tests"]
[[test]]
name = "xhttp_interop"
path = "tests/xhttp_interop.rs"
required-features = ["integration-tests"]
[[test]]
name = "reality_interop"
path = "tests/reality_interop.rs"
required-features = ["optional-peer-tests"]
[[test]]
name = "vless_encryption_interop"
path = "tests/vless_encryption_interop.rs"
required-features = ["optional-peer-tests"]
[[test]]
name = "privileged"
path = "tests/privileged.rs"
required-features = ["privileged-tests"]
[[test]]
name = "stress"
path = "tests/stress.rs"
required-features = ["stress-tests"]
[dependencies]
aho-corasick = "1"
async-trait = "*"
aws-lc-rs = { version = "*", default-features = false }
base64 = "*"
blake3 = "*"
bytes = "*"
chrono = "*"
dashmap = "*"
digest = "*"
etherparse = "*"
futures = "*"
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
ruzstd = "0.9.1"
prost = "0.14.4"
yaml-rust2 = { version = "0.13", default-features = false }
h2 = "*"
h3 = { version = "*", features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes"] }
h3-quinn = "*"
hickory-resolver = { version = "*", default-features = false, features = ["tokio", "tls-aws-lc-rs", "https-aws-lc-rs", "h3-aws-lc-rs"] }
http = "*"
httpdate = "1"
http-body-util = "*"
httparse = "*"
hyper = { version = "*", features = ["client", "server", "http1", "http2"] }
hyper-util = { version = "*", features = ["tokio", "server"] }
hyper-tungstenite = "0.30.0"
memory-stats = "1.2.0"
indexmap = "*"
instant-acme = { version = "=0.8.5", default-features = false, features = ["aws-lc-rs", "rcgen", "time", "x509-parser"] }
ipnetwork = "0.21"
libc = "*"
log = { version = "*", features = ["std", "release_max_level_info"] }
lru = "*"
md-5 = "*"
memchr = "*"
mime_guess = "*"
ml-kem = { version = "0.3.3", features = ["zeroize"] }
notify = "*"
parking_lot = "*"
percent-encoding = "*"
quinn = { version = "*", default-features = false, features = ["log", "platform-verifier", "runtime-tokio", "rustls-aws-lc-rs"] }
quinn-proto = { version = "0.11", default-features = false }
rand = "*"
rand_core = "*"
rcgen = { version = "*", default-features = false, features = ["aws_lc_rs", "pem"] }
rust-argon2 = "*"
rustc-hash = "*"
regex = { version = "1", default-features = false, features = ["std", "perf"] }
regex-automata = { version = "0.4", default-features = false, features = ["std", "syntax", "meta", "perf"] }
rustls = "=0.23.46"
serde = { version = "*", features = ["derive", "std"] }
serde_json = { version = "*", features = ["preserve_order"] }
serde_yaml = "*"
shake = "*"
smoltcp = { version = "*", default-features = false, features = ["std", "log", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-icmp", "auto-icmp-echo-reply", "socket-udp", "socket-tcp", "socket-tcp-cubic", "phy-tuntap_interface", "assembler-max-segment-count-32", "segmentation-offload"] }
socket2 = "*"
subtle = "*"
tokio = { version = "*", features = [
"fs",
"io-util",
"macros",
"net",
"rt-multi-thread",
"signal",
"sync",
"time",
] }
tokio-util = { version = "*", features = ["time", "io", "rt"] }
tun = { version = "*", features = ["async"] }
url = "*"
webpki-roots = { version = "*" }
x509-parser = { version = "*", default-features = false, features = ["verify-aws"] }
zeroize = "*"
[dev-dependencies]
tokio = { version = "*", features = ["test-util"] }
rcgen = { version = "*", default-features = false, features = ["aws_lc_rs", "pem", "x509-parser"] }
shoes-test-support = { path = "tests/support" }
tempfile = "*"
tokio-rustls = "*"
[target.'cfg(unix)'.dependencies]
gotatun = { version = "*", default-features = false, features = ["device", "aws-lc-rs"] }
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
hickory-resolver = { version = "*", default-features = false, features = ["system-config"] }
# jemalloc for better memory performance (not supported on Windows MSVC, iOS, or Android)
[target.'cfg(not(any(target_env = "msvc", target_os = "ios", target_os = "android")))'.dependencies]
tikv-jemallocator = "*"
[target.'cfg(target_os = "android")'.dependencies]
android_logger = "*"
jni = "0.22"
ndk-sys = "*"
[profile.release]
opt-level = 3
lto = "fat"
strip = true