- Added user defined polling and propagation timeout option in ACME
- Updated lego and added a few new DNS challenge providers
- Updated code gen to support new parameters
This commit is contained in:
Toby Chui
2024-10-27 16:17:44 +08:00
parent 9a371f5bcb
commit 5f64b622b5
10 changed files with 1562 additions and 1212 deletions

View File

@@ -36,8 +36,9 @@ import (
//name is the DNS provider name, e.g. cloudflare or gandi
//JSON (js) must be in key-value string that match ConfigableFields Title in providers.json, e.g. {"Username":"far","Password":"boo"}
func GetDNSProviderByJsonConfig(name string, js string, propagationTimeout int64)(challenge.Provider, error){
func GetDNSProviderByJsonConfig(name string, js string, propagationTimeout int64, pollingInterval int64)(challenge.Provider, error){
pgDuration := time.Duration(propagationTimeout) * time.Second
plInterval := time.Duration(pollingInterval) * time.Second
switch name {
{{magic}}
default:
@@ -292,6 +293,7 @@ func main() {
return nil, err
}
cfg.PropagationTimeout = pgDuration
cfg.PollingInterval = plInterval
return ` + providerName + `.NewDNSProviderConfig(cfg)`
generatedConvertcode += codeSegment
importList += ` "github.com/go-acme/lego/v4/providers/dns/` + providerName + "\"\n"