Hello,
While looking for a way to use rfc-2136 for DNS challenges I found this topic: Rfc2136 provider for caddy v2 - #2 by francislavoie
Unfortunately, I’m a Go noob, but I still wanted to give it a try and check the state of the current module to see what could be missing to use it.
My first attempt was to build caddy with this module but without much luck:
╭─apanel at dev in ~/workspaces/caddy
╰─○ ~/go/bin/xcaddy build --with github.com/francislavoie/rfc2136 --with github.com/kirsch33/realip
023/01/16 08:44:33 [INFO] Temporary folder: /tmp/buildenv_2023-01-16-0844.3218045671
2023/01/16 08:44:33 [INFO] Writing main module: /tmp/buildenv_2023-01-16-0844.3218045671/main.go
package main
import (
caddycmd "github.com/caddyserver/caddy/v2/cmd"
// plug in Caddy modules here
_ "github.com/caddyserver/caddy/v2/modules/standard"
_ "github.com/francislavoie/rfc2136"
_ "github.com/kirsch33/realip"
)
func main() {
caddycmd.Main()
}
2023/01/16 08:44:33 [INFO] Initializing Go module
2023/01/16 08:44:33 [INFO] exec (timeout=10s): /usr/bin/go mod init caddy
go: creating new go.mod: module caddy
go: to add module requirements and sums:
go mod tidy
2023/01/16 08:44:33 [INFO] Pinning versions
2023/01/16 08:44:33 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.6.2
go: added github.com/caddyserver/certmagic v0.17.2
go: added github.com/cespare/xxhash/v2 v2.1.2
go: added github.com/fsnotify/fsnotify v1.5.1
go: added github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: added github.com/golang/mock v1.6.0
go: added github.com/golang/protobuf v1.5.2
go: added github.com/google/uuid v1.3.0
go: added github.com/klauspost/cpuid/v2 v2.1.1
go: added github.com/libdns/libdns v0.2.1
go: added github.com/lucas-clemente/quic-go v0.29.2
go: added github.com/marten-seemann/qpack v0.2.1
go: added github.com/marten-seemann/qtls-go1-18 v0.1.3
go: added github.com/marten-seemann/qtls-go1-19 v0.1.1
go: added github.com/matttproud/golang_protobuf_extensions v1.0.1
go: added github.com/mholt/acmez v1.0.4
go: added github.com/miekg/dns v1.1.50
go: added github.com/nxadm/tail v1.4.8
go: added github.com/onsi/ginkgo v1.16.4
go: added github.com/prometheus/client_golang v1.12.2
go: added github.com/prometheus/client_model v0.2.0
go: added github.com/prometheus/common v0.32.1
go: added github.com/prometheus/procfs v0.7.3
go: added go.uber.org/atomic v1.9.0
go: added go.uber.org/multierr v1.6.0
go: added go.uber.org/zap v1.23.0
go: added golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
go: added golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e
go: added golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
go: added golang.org/x/net v0.0.0-20220812165438-1d4ff48094d1
go: added golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10
go: added golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
go: added golang.org/x/text v0.3.8-0.20211004125949-5bd84dd9b33b
go: added golang.org/x/tools v0.1.10
go: added golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f
go: added google.golang.org/protobuf v1.28.0
go: added gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
2023/01/16 08:44:34 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/francislavoie/rfc2136 github.com/caddyserver/caddy/v2
go: downloading github.com/francislavoie/rfc2136 v0.0.0-20210212120350-4b5f70325898
**go: github.com/francislavoie/rfc2136@v0.0.0-20210212120350-4b5f70325898: parsing go.mod:**
** module declares its path as: github.com/libdns/rfc2136**
** but was required as: github.com/francislavoie/rfc2136**
2023/01/16 08:44:39 [FATAL] exit status 1
It’s not starting well for a first attempt. I guess I don’t know the trick to build caddy with a plugin that isn’t in the correct namespace ?
Any hints would be welcome
Kind regards.
EDIT: I’m not sure if it’s the right category to post such questions