Files
leaf/leaf-e2e/Cargo.toml
eric 9725f0a85e test(e2e): a release plugin survives a truncated reply address
The address parser fix is about a panic that only a release build turns
into an abort, since a debug plugin's guard catches it. A unit test cannot
show that the process lives, so this case loads the Shadowsocks plugin
built with the release profile, whatever profile the run uses.

A stand-in server speaking Shadowsocks AEAD UDP with leaf's own codec
echoes datagrams, and answers a request for a malformed reply with an
authenticated one whose address is cut short: a lone domain type byte, and
a domain one byte short of its port. The client must refuse both and keep
carrying traffic. On the old parser the case process dies with SIGABRT at
either reply.

Fixtures can now name a cargo profile of their own.
2026-12-04 08:35:38 +08:00

56 lines
1.8 KiB
TOML

[package]
name = "leaf-e2e"
version = "0.1.0"
edition = "2021"
publish = false
build = "build.rs"
description = "End-to-end test harness for the leaf plugin host"
[lib]
name = "leaf_e2e"
path = "src/lib.rs"
# The library is the harness, not a unit-tested component; everything it has to
# say is said by the `e2e` target.
test = false
[dependencies]
anyhow = "1"
# The stand-in Shadowsocks server hands leaf's own codec its buffers.
bytes = "1"
futures = "0.3"
# `auto-reload` is enabled unconditionally, not mirrored behind a feature of
# our own: it changes the shape of `StartOptions`, and cargo unifies features
# across a workspace build, so leaf-cli asking for it would otherwise leave this
# crate compiling against a struct it cannot see. Every node passes `false`.
leaf = { path = "../leaf", features = ["auto-reload", "plugin"] }
libloading = "0.7"
libtest-mimic = "0.8"
rcgen = "0.13"
rand = "0.8"
# The site whose TLS 1.3 handshake a ShadowTLS server borrows. ring, so the
# harness does not pull a second crypto provider into a build that has one.
rustls = { version = "0.23", default-features = false, features = ["std", "ring", "tls12", "logging"] }
rustls-pemfile = "2"
serde_json = "1"
sha2 = "0.10"
tokio = { version = "1", features = [
"io-util",
"macros",
"net",
"rt-multi-thread",
"sync",
"time",
] }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12", "logging"] }
# Raising the descriptor limit and reading process CPU time: both are what a
# load generator needs to tell a real failure apart from a limit it hit.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
# The whole crate is a test harness; the single `[[test]]` target owns the CLI,
# so libtest's own harness is turned off.
[[test]]
name = "e2e"
harness = false