feat: command line supports dns challenge

This commit is contained in:
2022-02-04 14:38:08 +08:00
parent ac540437dd
commit 6639276e11
4 changed files with 18 additions and 10 deletions

View File

@@ -92,6 +92,8 @@ async fn main() -> tide::Result<()> {
.arg(Arg::with_name("skip-verify-ip").short("k").long("skip-verify-ip").help("Skip verify public ip"))
.arg(Arg::with_name("skip-verify-certificate").short("K").long("skip-verify-certificate").help("Skip verify certificate"))
.arg(Arg::with_name("allow-interact").long("allow-interact").help("Allow interact"))
.arg(Arg::with_name("challenge-type").short("T").long("challenge-type").takes_value(true).default_value("http").help("Challenge type, http or dns"))
.arg(Arg::with_name("dns-supplier").short("s").long("dns-supplier").takes_value(true).default_value("account://***:****@**?id=*").help("DNS supplier"))
.get_matches();
if matches.is_present("verbose") {
@@ -249,8 +251,8 @@ async fn main() -> tide::Result<()> {
};
let acme_request = AcmeRequest {
challenge: AcmeChallenge::Http,
credential_supplier: None,
challenge: AcmeChallenge::from_str(matches.value_of("challenge-type")),
credential_supplier: matches.value_of("dns-supplier"),
allow_interact: false,
contract_email: &email,
primary_name,