Implement wraith serve CLI subcommand with clap
Add serve subcommand with all flags matching server.md CLI interface: --key, --authorized-keys, --cert-authority, --transport, --listen, --tls-cert, --tls-key, --acme-domain, --stealth, --proxy, --iroh-relay, --max-connections-per-ip, --max-auth-attempts. --key is required, --transport defaults to tcp, --listen defaults to 0.0.0.0:22. --stealth validates TLS transport. --acme-domain requires acme feature flag. --transport iroh prints endpoint ID on startup. Key inputs accept file paths. Errors reported to stderr with non-zero exit code. Also adds acme feature flag and rustls-pemfile/rustls-pki-types dependencies for TLS cert loading.
This commit is contained in:
@@ -9,8 +9,9 @@ path = "src/main.rs"
|
||||
|
||||
[features]
|
||||
default = ["tls", "iroh"]
|
||||
tls = ["wraith-core/tls"]
|
||||
tls = ["wraith-core/tls", "dep:rustls-pemfile", "dep:rustls-pki-types"]
|
||||
iroh = ["wraith-core/iroh", "dep:iroh", "dep:url"]
|
||||
acme = ["wraith-core/acme", "dep:rustls-acme", "dep:rustls", "tls"]
|
||||
|
||||
[dependencies]
|
||||
wraith-core = { path = "../wraith-core" }
|
||||
@@ -18,4 +19,8 @@ clap = { version = "4", features = ["derive", "env"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
anyhow = "1"
|
||||
iroh = { version = "0.34", optional = true }
|
||||
url = { version = "2", optional = true }
|
||||
url = { version = "2", optional = true }
|
||||
rustls-acme = { version = "0.12", optional = true }
|
||||
rustls = { version = "0.23", optional = true, features = ["aws_lc_rs"] }
|
||||
rustls-pemfile = { version = "2", optional = true }
|
||||
rustls-pki-types = { version = "1", optional = true }
|
||||
Reference in New Issue
Block a user