Skip to content

Commit

Permalink
Fixed #231
Browse files Browse the repository at this point in the history
- Added higher propagation timeout for netcup
- Fixed bug in CICD script
  • Loading branch information
tobychui committed Jul 16, 2024
1 parent cfcd10d commit 301072d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/dns_challenge_update/code-gen/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var defTemplate string = `package acmedns
import (
"encoding/json"
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
{{imports}}
Expand Down Expand Up @@ -282,6 +283,18 @@ func main() {
}
return ` + providerName + `.NewDNSProviderConfig(cfg)`

//Add fixed for Netcup timeout
if strings.ToLower(providerName) == "netcup" {
codeSegment = `
case "` + providerName + `":
cfg := ` + providerName + `.NewDefaultConfig()
err := json.Unmarshal([]byte(js), &cfg)
if err != nil {
return nil, err
}
cfg.PropagationTimeout = 1200 * time.Second
return ` + providerName + `.NewDNSProviderConfig(cfg)`
}
generatedConvertcode += codeSegment
importList += ` "github.com/go-acme/lego/v4/providers/dns/` + providerName + "\"\n"
}
Expand Down
1 change: 1 addition & 0 deletions tools/dns_challenge_update/code-gen/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go run ./extract.go
go run ./extract.go -- "win7"

echo "Cleaning up lego"
sleep 2
# 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/
Expand Down

0 comments on commit 301072d

Please sign in to comment.