mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 18:24:36 +00:00
fix: add missing CLI help text (#2213)
This commit is contained in:
@@ -274,6 +274,9 @@ core_clap:
|
|||||||
check_config:
|
check_config:
|
||||||
en: Check config validity without starting the network
|
en: Check config validity without starting the network
|
||||||
zh-CN: 检查配置文件的有效性并退出
|
zh-CN: 检查配置文件的有效性并退出
|
||||||
|
daemon:
|
||||||
|
en: Run in daemon mode
|
||||||
|
zh-CN: 以守护进程模式运行
|
||||||
file_log_size_mb:
|
file_log_size_mb:
|
||||||
en: "per file log size in MB, default is 100MB"
|
en: "per file log size in MB, default is 100MB"
|
||||||
zh-CN: "单个文件日志大小,单位 MB,默认值为 100MB"
|
zh-CN: "单个文件日志大小,单位 MB,默认值为 100MB"
|
||||||
|
|||||||
@@ -193,8 +193,11 @@ struct PeerArgs {
|
|||||||
|
|
||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
enum PeerSubCommand {
|
enum PeerSubCommand {
|
||||||
|
/// List connected peers
|
||||||
List,
|
List,
|
||||||
|
/// Show public IPv6 address information
|
||||||
Ipv6,
|
Ipv6,
|
||||||
|
/// List foreign networks discovered by this instance
|
||||||
ListForeign {
|
ListForeign {
|
||||||
#[arg(
|
#[arg(
|
||||||
long,
|
long,
|
||||||
@@ -203,6 +206,7 @@ enum PeerSubCommand {
|
|||||||
)]
|
)]
|
||||||
trusted_keys: bool,
|
trusted_keys: bool,
|
||||||
},
|
},
|
||||||
|
/// List global foreign networks from the peer center
|
||||||
ListGlobalForeign,
|
ListGlobalForeign,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,16 +218,18 @@ struct RouteArgs {
|
|||||||
|
|
||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
enum RouteSubCommand {
|
enum RouteSubCommand {
|
||||||
|
/// List routes propagated by peers
|
||||||
List,
|
List,
|
||||||
|
/// Dump routes in CIDR format
|
||||||
Dump,
|
Dump,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Args, Debug)]
|
#[derive(Args, Debug)]
|
||||||
struct ConnectorArgs {
|
struct ConnectorArgs {
|
||||||
#[arg(short, long)]
|
#[arg(short, long, help = "filter connectors by virtual IPv4 address")]
|
||||||
ipv4: Option<String>,
|
ipv4: Option<String>,
|
||||||
|
|
||||||
#[arg(short, long)]
|
#[arg(short, long, help = "filter connectors by peer URL")]
|
||||||
peers: Vec<String>,
|
peers: Vec<String>,
|
||||||
|
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
@@ -242,6 +248,7 @@ enum ConnectorSubCommand {
|
|||||||
#[arg(help = "connector url, e.g., tcp://1.2.3.4:11010")]
|
#[arg(help = "connector url, e.g., tcp://1.2.3.4:11010")]
|
||||||
url: String,
|
url: String,
|
||||||
},
|
},
|
||||||
|
/// List connectors
|
||||||
List,
|
List,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,6 +290,7 @@ struct AclArgs {
|
|||||||
|
|
||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
enum AclSubCommand {
|
enum AclSubCommand {
|
||||||
|
/// Show ACL rule hit statistics
|
||||||
Stats,
|
Stats,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,19 +458,25 @@ struct InstallArgs {
|
|||||||
#[arg(long, default_value = env!("CARGO_PKG_DESCRIPTION"), help = "service description")]
|
#[arg(long, default_value = env!("CARGO_PKG_DESCRIPTION"), help = "service description")]
|
||||||
description: String,
|
description: String,
|
||||||
|
|
||||||
#[arg(long)]
|
#[arg(long, help = "display name shown by the service manager")]
|
||||||
display_name: Option<String>,
|
display_name: Option<String>,
|
||||||
|
|
||||||
#[arg(long)]
|
#[arg(
|
||||||
|
long,
|
||||||
|
help = "whether to disable starting the service automatically on boot (true/false)"
|
||||||
|
)]
|
||||||
disable_autostart: Option<bool>,
|
disable_autostart: Option<bool>,
|
||||||
|
|
||||||
#[arg(long)]
|
#[arg(
|
||||||
|
long,
|
||||||
|
help = "whether to disable automatic restart when the service fails (true/false)"
|
||||||
|
)]
|
||||||
disable_restart_on_failure: Option<bool>,
|
disable_restart_on_failure: Option<bool>,
|
||||||
|
|
||||||
#[arg(long, help = "path to easytier-core binary")]
|
#[arg(long, help = "path to easytier-core binary")]
|
||||||
core_path: Option<PathBuf>,
|
core_path: Option<PathBuf>,
|
||||||
|
|
||||||
#[arg(long)]
|
#[arg(long, help = "working directory for the easytier-core service")]
|
||||||
service_work_dir: Option<PathBuf>,
|
service_work_dir: Option<PathBuf>,
|
||||||
|
|
||||||
#[arg(
|
#[arg(
|
||||||
|
|||||||
Reference in New Issue
Block a user