Files
shoes/Cargo.toml
cfal 0f1aec2939 Refresh dependencies and CI tooling (#277)
* Refresh dependencies and CI tooling while preserving fork pins

* Make privileged test fixtures compatible with Ubuntu 26
2026-11-06 14:59:25 +08:00

234 lines
7.7 KiB
TOML

[package]
name = "shoes"
version = "0.3.6"
publish = false # Cargo strips fork patches from crates.io packages.
edition = "2024"
rust-version = "1.99.1"
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]
# REALITY patches on stable rustls: reality/0.23.46-f04804fa1334. Pins the patched commit, not the branch.
rustls = { git = "https://github.com/cfal/rustls", rev = "f1a23c187330386e9e7f14a21dbae368034dc430" }
blake3 = { git = "https://github.com/cfal/BLAKE3", rev = "cd98c1c4112ed3b2cf2140e1844f266b3d665b53" }
# Bounds buffered H3 frames before payload reads and skips unknown frames incrementally.
h3 = { git = "https://github.com/cfal/h3", rev = "90e3013710e35143d1969dc3421f5951fbe49966" }
h3-quinn = { git = "https://github.com/cfal/h3", rev = "90e3013710e35143d1969dc3421f5951fbe49966" }
# Backports hickory-dns/hickory-dns#3861 and preserves H3 connection-close failover.
hickory-net = { git = "https://github.com/cfal/hickory-dns", rev = "3fa0a0e3ebd9df778256f18e9264f70d284d31c0" }
hickory-proto = { git = "https://github.com/cfal/hickory-dns", rev = "3fa0a0e3ebd9df778256f18e9264f70d284d31c0" }
hickory-resolver = { git = "https://github.com/cfal/hickory-dns", rev = "3fa0a0e3ebd9df778256f18e9264f70d284d31c0" }
# 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 = "042e568bfa39d0f111a23a4718ec257e474fd1e7" }
[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 = "rule_properties"
path = "tests/rule_properties.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 = "ws_early_data"
path = "tests/ws_early_data.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"
anyhow = "1"
async-trait = "*"
aws-lc-rs = { version = "*", default-features = false }
base64 = "*"
blake2 = "0.11"
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 = { version = "0.21", features = ["serde"] }
libc = "*"
log = { version = "*", features = ["std", "release_max_level_info"] }
lru = "*"
md-5 = "*"
memchr = "*"
mime_guess = "*"
ml-kem = { version = "0.3.4", features = ["zeroize"] }
notify = "*"
# 0.13's futex_time64 probe triggers SIGSYS on 32-bit Android API 26-29.
parking_lot = "0.12.5"
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 = { version = "*", features = ["all"] }
sntpc = { version = "=0.11.0", default-features = false }
subtle = "*"
tendns = { version = "0.2", default-features = false }
tokio = { version = "*", features = [
"fs",
"io-util",
"macros",
"net",
"process",
"rt-multi-thread",
"signal",
"sync",
"time",
] }
tokio-util = { version = "*", features = ["time", "io", "rt"] }
tun = { version = "*", features = ["async"] }
url = "*"
uuid = "1"
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(target_os = "linux")'.dependencies]
rtnetlink = "0.24"
nftables = "0.6.3"
[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