Using DNS Plugins like "generic" and "httpreq"

Hi,

I plan to use Caddy with DNS ACME Challenge and read through the documentation where it said " Caddy supports many DNS providers.". I read through the source code and decided to ready my own DNS Server for the httpreq method.

I noticed that this method was only pulled in a few days ago and also wrote a sh script to make it work via the “generic” DNS provider.

When downloading i noticed that generic isn’t available from the plugin list either.
Is the only option to use those plugins building caddy myself?

Best regards and thank you for the awesome work.

Howdy @Niksac, welcome to the Caddy community.

I think this is just a case where @matt has yet to document the functionality and make it available to the build server (download page). As you noted, the httpreq provider was only recently added to the Caddy repo for plugging in.

Hi,
thank you!!
I think the “generic” / exec DNS provider was added quite some time ago which makes me wonder why he is still missing from the downloads page.

I tried to build caddy to get these plugins working like this:

package main

import (
	"github.com/mholt/caddy/caddy/caddymain"
	_ "github.com/caddyserver/dnsproviders/generic"
)

func main() {
	caddymain.Run()
}

Unfortunately i am getting errors like this:

go: github.com/h2non/gock@v0.0.0-00010101000000-000000000000: unknown revision 000000000000
go: error loading module requirements

I have no experience in go - can anybody hint me how to get a built with those providers?

Nik

I’m assuming you followed all the instructions over at https://github.com/mholt/caddy/wiki/Plugging-in-Plugins-Yourself?

Yes, also it works, when i don’t include the dns plugin

Strange. Can you build it with a different, known working provider plugin? Like github.com/caddyserver/dnsproviders/cloudflare?

It happens in the module dnsproviders, so no provider works.

If i were to guess, i’m facing this
https://github.com/caddyserver/dnsproviders/commit/0fc9cfbf36d5790a809bccd4722910c01affa073

mholt already did something to fix it. I guess i need to import the master of the dnsproviders package.

I successfully built with the "generic " package by adding this to my local go.mod

replace GitHub - h2non/gock: HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽ => gopkg.in/h2non/gock.v1 v1.0.14

Any idea if / when the remaining DNS plugins will be available from the build-server?

The generic plugin - for instance - was added to the source 11 month ago.

I’m not sure, sorry. That’s something only @matt can answer.

Oh. Sorry… I just need to set aside some time and deploy them. There are so many :sweat:

Actually, anyone can add the DNS provider plugins to the Caddy website. Just create an account and go through the form to register a new plugin.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.