feat(cli): implement wraith connect subcommand with clap derive

All CLI flags from client.md: --server, --peer, --transport (default tcp),
--identity, --socks5 (default 127.0.0.1:1080), --forward (repeatable),
--remote-forward (repeatable), --proxy, --iroh-relay, --tls-server-name,
--insecure. Env var defaults: WRAITH_SERVER, WRAITH_IDENTITY. Validates
--server required for tcp/tls, --peer required for iroh, --identity required.
Warns on --proxy with --transport tcp (ADR-019). Translates args to
ConnectOptions and calls ClientSession::new(opts).run().await. Errors to
stderr with non-zero exit.
This commit is contained in:
2026-06-02 11:39:57 +00:00
parent f13a1c985f
commit 94feb5fdac
3 changed files with 235 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -5585,7 +5585,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"clap",
"iroh",
"tokio",
"url",
"wraith-core",
]