toolkit: no thread panic in http_fetch, no casts, exact egress-proxy form

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
2026-09-23 16:13:43 -07:00
parent e69ba632e6
commit 9662966b45
6 changed files with 62 additions and 4 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ fn main() -> ExitCode {
/// The `egress-proxy --socket <path> --allow <list>` form. Anything else, including a program name
/// that is not `egress-proxy`, returns `None` so the tool form handles it.
fn parse_egress_proxy(args: &[OsString]) -> Option<ExitCode> {
if args.first()?.as_bytes() != b"egress-proxy" {
// Exactly five words: a longer list is not this form, and goes to the tool form (exit 2).
if args.len() != 5 || args.first()?.as_bytes() != b"egress-proxy" {
return None;
}
// The form is `egress-proxy --socket <path> --allow <list>`, in that order.