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.
A new interop lane puts a real leaf with each plugin in front of the servers
people deploy, built from source at pinned revisions: anytls-go, sing-box
stable and its testing branch, mihomo, and the original shadow-tls. Every
pair runs the stream behaviours, plus the server's padding scheme checked on
the wire, fingerprints, and the connections that must fail: wrong password,
hijacked to the real site, TLS 1.2 site in strict mode.
AnyTLS skips half-close-tail, which its protocol cannot carry. ShadowTLS
marks it a known defect: the host shuts the socket's write side while an
engine is still handshaking.
`make interop` runs the lane, `make e2e` leaves it out, and CI runs it in a
job of its own with the built servers cached. The harness no longer hands
out a port twice in one process, and builds upstream Rust servers with their
own toolchain, outside the workspace.
`leaf-e2e` starts real leaf instances and drives them from the outside over
SOCKS5, so a case covers the path a deployment takes -- config parsing, plugin
loading, routing, the dispatcher, the C ABI data plane -- and nothing reaches
into leaf to build a handler by hand. Cases are values rather than `#[test]`
functions, so the suite is a matrix of implementation, protocol, transport and
behaviour instead of a wall of copies, and each runs in its own process, free
to crash, hang, or set load-time environment.
The lanes:
- `differential` runs a behaviour natively and again with a plugin substituted
for one stage, and requires the two to agree. The server is stock leaf, so
these are interoperability tests. `protocols`, `halfclose` and `teardown`
extend that across every stack, relay and selector, the end of a request on
each transport, and shutdown.
- `abi`, `loader` and `coexist` check what the host accepts, refuses, and can
load at once, through a real `dlopen`.
- `hostile` and `datagram` drive conformance plugins -- one in Rust, one in Go
-- that misbehave on request, exercising the host's bounds checks, clamps,
buffer growth and `decode_packet` handling.
- `stress` and the meters measure both sides back to back and assert the ratio,
since absolute numbers from a shared runner say little; throughput, latency,
setup cost and cpu cost land in `meters.json` beside the case logs. What the
process is holding is asserted directly instead, against the case's own
allocator, because what matters there is that it stopped growing.
- `blackbox` runs the shipped binary: on a config file, and on a plugin
library through `--verify-plugin`, whose report has to agree with what the
loader itself would do.
Plugins are built by the harness, and a case whose toolchain is missing is
reported as ignored with the reason; `--strict`, which CI passes, makes that a
failure, so the suite cannot go green by running nothing. The suite runs on
Windows too, where a pause is never shorter than 16ms and cases that dribble
bytes bound their pauses instead.