feat: v1.3.0 add directory-url support

This commit is contained in:
2022-11-10 01:02:06 +08:00
parent 10d680a364
commit 315fddaa15
5 changed files with 15 additions and 4 deletions

View File

@@ -50,6 +50,7 @@ async fn main() -> tide::Result<()> {
.arg(Arg::with_name("algo").short("a").long("algo").takes_value(true).default_value("ec384").help("Pki algo"))
.arg(Arg::with_name("timeout").long("timeout").takes_value(true).default_value("5000").help("Timeout (ms)"))
.arg(Arg::with_name("mode").short("m").long("mode").takes_value(true).default_value("prod").help("Mode"))
.arg(Arg::with_name("directory-url").long("directory-url").takes_value(true).help("ACME directory URL"))
.arg(Arg::with_name("dir").long("dir").takes_value(true).default_value("acme_dir").help("Account key dir"))
.arg(Arg::with_name("cert-dir").long("cert-dir").takes_value(true).help("Certificate dir"))
.arg(Arg::with_name("config").short("c").long("config").takes_value(true).help("Cert config"))
@@ -222,6 +223,7 @@ async fn main() -> tide::Result<()> {
alt_names: &alt_names,
algo,
mode,
directory_url: matches.value_of("directory-url").map(|u| u.to_string()),
account_dir,
timeout,
local_public_ip: local_public_ip.as_deref(),
@@ -279,6 +281,7 @@ async fn main() -> tide::Result<()> {
alt_names: &alt_names,
algo,
mode,
directory_url: matches.value_of("directory-url").map(|u| u.to_string()).or(filtered_cert_config.directory_url.clone()),
account_dir,
timeout,
local_public_ip: local_public_ip.as_deref(),