- PROXY v2 header parsing is now the pure, total function `parse_v2_header(buf, limit) -> (SocketAddr, consumed)`; the async reader only reads bytes and delegates. This makes the parser reachable from tests and fuzz targets and keeps every index bounds-checked. - tests/proxy_v2_parser.rs: valid v4/v6 headers, bad signature, non-PROXY command, TLVs, every truncated prefix, oversized header, unsupported family, short address block, and a deterministic sweep over family/length. - fuzz/: cargo-fuzz targets `http_head` (scan_head + evaluate) and `proxy_v2` with invariants (no panic, no out-of-buffer consumption, family matches the header). Seeds for the HTTP head keep coverage useful; `make fuzz` runs 60 s per target. Both targets ran clean (7M and 3M executions). - docs/testing.md documents the fuzz workflow; .gitignore covers the generated corpus/artifacts.
29 lines
No EOL
247 B
Text
29 lines
No EOL
247 B
Text
GET Z/1 HTTP/1.1
|
|
osHt:
|
|
Ac
|
|
osHt:
|
|
AosHt:
|
|
Ac
|
|
osHt:
|
|
AcceosHt:
|
|
AcceTTGET / HTTP/2.1
|
|
Ho]t:
|
|
|
|
t:
|
|
AOGP/(1P/1t:
|
|
|
|
osHt:
|
|
ce.1
|
|
Ho]t:
|
|
|
|
t:
|
|
AOGPTGET / HTTP/1.1
|
|
Ho]t:
|
|
|
|
t:
|
|
AOGP/(1P/1t:
|
|
|
|
osHt:
|
|
ce.1
|
|
Ho]t:
|
|
|
|
t:
|
|
ATTGET / HTTP/1.1
|
|
Ho]t:
|
|
|
|
GET t |