scpcap v0
This commit is contained in:
+24
-2
@@ -1,3 +1,25 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
mod channel;
|
||||
mod chunker;
|
||||
mod cli;
|
||||
mod client;
|
||||
mod naming;
|
||||
mod pipeline;
|
||||
mod protocol;
|
||||
mod server;
|
||||
mod ssh;
|
||||
mod tail;
|
||||
mod zstd_frame;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let mut args: Vec<String> = std::env::args().collect();
|
||||
if args.get(1).map(|s| s.as_str()) == Some("--server") {
|
||||
args.remove(1);
|
||||
let server_cli = cli::ServerCli::parse_from(args);
|
||||
server::run(server_cli)
|
||||
} else {
|
||||
let client_cli = cli::ClientCli::parse_from(args);
|
||||
client::run(client_cli)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user