Skip to content

Commit

Permalink
Merge pull request #689 from rjocoleman/feat/libdns_acmedns
Browse files Browse the repository at this point in the history
Add ACME-DNS provider for libdns
  • Loading branch information
foxcpp authored Nov 24, 2024
2 parents b33a1e2 + 198a9a3 commit 6301215
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/reference/tls-acme.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ To be able to use these, you need to compile maddy
with "libdns_PROVIDER" build tag.
E.g.
```
./build.sh -tags 'libdns_googleclouddns'
./build.sh --tags 'libdns_googleclouddns'
```

- gandi
Expand Down Expand Up @@ -263,3 +263,13 @@ dns namedotcom {
}
```

- acmedns (non-default)

```
dns acmedns {
username "..."
password "..."
subdomain "..."
server_url "..."
}
```
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/libdns/acmedns v0.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/libdns/acmedns v0.2.0 h1:zTXdHZwe3r2issdVRyqt5/4X2yHpiBVmFnTrwBA29ik=
github.com/libdns/acmedns v0.2.0/go.mod h1:XlKHilQQK/IGHYY//vCb903PdG4Wc/XnDQzcMp2hV3g=
github.com/libdns/alidns v1.0.3-0.20230628155627-8d5d630d5516 h1:tPVSANkA4lo+K65YjsQcaQ1uh6sb0zRBQDz78l1Fo4Y=
github.com/libdns/alidns v1.0.3-0.20230628155627-8d5d630d5516/go.mod h1:e18uAG6GanfRhcJj6/tps2rCMzQJaYVcGKT+ELjdjGE=
github.com/libdns/cloudflare v0.1.1-0.20221006221909-9d3ab3c3cddd h1:c5hc0b5/pFqFeyQaOTVmYJbyr+QwZZFcMnjgtZGIk6k=
Expand Down
28 changes: 28 additions & 0 deletions internal/libdns/acmedns.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//go:build libdns_acmedns || libdns_all
// +build libdns_acmedns libdns_all

package libdns

import (
"github.com/foxcpp/maddy/framework/config"
"github.com/foxcpp/maddy/framework/module"
"github.com/libdns/acmedns"
)

func init() {
module.Register("libdns.acmedns", func(modName, instName string, _, _ []string) (module.Module, error) {
p := acmedns.Provider{}
return &ProviderModule{
RecordDeleter: &p,
RecordAppender: &p,
setConfig: func(c *config.Map) {
c.String("username", false, true, "", &p.Username)
c.String("password", false, true, "", &p.Password)
c.String("subdomain", false, true, "", &p.Subdomain)
c.String("server_url", false, true, "", &p.ServerURL)
},
instName: instName,
modName: modName,
}, nil
})
}

0 comments on commit 6301215

Please sign in to comment.