mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
ssservice genkey, helper for generate encryption key
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
use std::{env, path::Path, process::ExitCode};
|
||||
|
||||
use clap::Command;
|
||||
use shadowsocks_rust::service::{local, manager, server};
|
||||
use shadowsocks_rust::service::{genkey, local, manager, server};
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let app = Command::new("shadowsocks")
|
||||
@@ -36,12 +36,17 @@ fn main() -> ExitCode {
|
||||
.subcommand(
|
||||
manager::define_command_line_options(Command::new("manager")).about("Shadowsocks Server Manager service"),
|
||||
)
|
||||
.subcommand(
|
||||
genkey::define_command_line_options(Command::new("genkey"))
|
||||
.about("Generate shadowsocks encryption key for method"),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
match matches.subcommand() {
|
||||
Some(("local", matches)) => local::main(matches),
|
||||
Some(("server", matches)) => server::main(matches),
|
||||
Some(("manager", matches)) => manager::main(matches),
|
||||
Some(("genkey", matches)) => genkey::main(matches),
|
||||
_ => unreachable!("expecting a subcommand"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user