Commit Graph

10 Commits

Author SHA1 Message Date
94feb5fdac 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.
2026-06-02 11:39:57 +00:00
243243a82f Implement NAPI connect() function — single SSH channel as duplex stream
- Add WraithConnectOptions struct with napi fields: server, peer, transport,
  identity (string path or Buffer), tlsServerName, insecure, irohRelay, proxy
- Add WraithStream napi class wrapping SSH channel read/write halves via
  ChannelStream::into_stream() + tokio::io::split()
- Implement connect() async function: transport creation (tcp, tls), SSH client
  connection, authenticate, open direct_tcpip channel, return WraithStream
- Identity field accepts file path (string) or in-memory key data (Buffer)
- All Rust errors marshalled to JavaScript exceptions with descriptive messages
- Add ForwardError enum to wraith-core (required by forward.rs)
- Enable tls, iroh features on wraith-core dependency
- 7 unit tests for key source resolution and address parsing
2026-06-02 11:10:42 +00:00
bf8233af61 fix: add rand dev-dep, install rustls CryptoProvider in TLS tests, fix iroh OsRng import 2026-06-02 10:32:29 +00:00
b3589a038e Merge remote-tracking branch 'origin/feat/transport/iroh-transport' into transport/trait-and-types
# Conflicts:
#	Cargo.lock
#	crates/wraith-core/Cargo.toml
2026-06-02 10:30:12 +00:00
c3f5f3f504 Implement IrohTransport and IrohAcceptor (feature-gated iroh)
Add iroh QUIC P2P transport using tokio::io::join for stream duplexing
per ADR-003. Default relay is n0's https://relay.iroh.network/ (ADR-009).
Proxy URL passed to Endpoint::builder (ADR-010). Integration test marked
#[ignore] for CI since it requires iroh relay connectivity.
2026-06-02 10:29:40 +00:00
b559e335d3 Implement server-side auth with ServerAuthConfig (Ed25519 keys + cert-authority) 2026-06-02 10:21:28 +00:00
eb032c87f1 Implement client-side SSH auth handler with ClientAuthConfig and ClientHandler 2026-06-02 10:03:56 +00:00
b4f4f2ed8c Implement SSH key material loading with KeySource, load_private_key, load_public_keys, and CertAuthorityEntry 2026-06-02 09:52:39 +00:00
dddc6d7a4c Define Transport trait, TransportAcceptor trait, TransportInfo, and TransportKind types 2026-06-02 09:17:50 +00:00
2bc15f1035 Initialize Cargo workspace with wraith-core, wraith, and wraith-napi crates
- Workspace root Cargo.toml with three crate members
- wraith-core: library with feature flags (tls, iroh, acme), core deps (russh, tokio, tracing, anyhow, thiserror, tokio-util), module skeleton (transport, client, server, auth, socks5, error)
- wraith: binary crate depending on wraith-core with clap derive
- wraith-napi: cdylib crate depending on wraith-core, napi, napi-derive
- .gitignore for target/ and node_modules/
2026-06-02 09:14:40 +00:00