Fixed bugs caused by DNS challenge PR

- Fixed concurrency in EAB and DNS credential save
- Fixed missing CA name in ACME Obtain certificate handler
- Optimized acmedns code config
- Fixed a lot of front-end bugs in acme snippet
This commit is contained in:
Toby Chui
2024-05-14 16:21:47 +08:00
parent 3454a9b975
commit ce4f46cb50
8 changed files with 593 additions and 908 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -176,6 +176,8 @@ func main() {
Title: fields[0],
Datatype: fields[1],
})
} else if fields[0] == "TTL" {
//haveTTLField = true
} else {
hiddenKeys = append(hiddenKeys, &Field{
Title: fields[0],
@ -210,17 +212,15 @@ func main() {
HiddenFields: hiddenKeys,
}
//Generate the code for it
//Generate the code for converting incoming json into target config
codeSegment := `
case "` + providerName + `":
cfg := ` + providerName + `.Config{}
cfg := ` + providerName + `.NewDefaultConfig()
err := json.Unmarshal([]byte(js), &cfg)
if err != nil {
return nil, err
}
return ` + providerName + `.NewDNSProviderConfig(&cfg)`
return ` + providerName + `.NewDNSProviderConfig(cfg)`
generatedConvertcode += codeSegment
importList += ` "github.com/go-acme/lego/v4/providers/dns/` + providerName + "\"\n"

View File

@ -22,5 +22,5 @@ go run ./extract.go
echo "Cleaning up lego"
# Comment the line below if you dont want to pull everytime update
# This is to help go compiler to not load all the lego source file when compile
rm -rf ./lego/
#rm -rf ./lego/
echo "Config generated"