legodeprecated

package module
v0.0.0-...-85cfd7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2020 License: MIT Imports: 4 Imported by: 0

README

DNS Providers for Caddy (deprecated)

This one module gives Caddy the ability to solve the ACME DNS challenge with over 75 DNS providers.

⚠️ This module is deprecated

This module wraps DNS providers that are implemented by go-acme/lego which uses an old API that is no longer supported by Caddy. As such, this module is a temporary shim until a sufficient number of providers are ported to the new libdns interfaces.

You can use this module to get up and running quickly with your provider of choice, but instead of using this module long-term, please consider contributing to a libdns package for your provider instead.

The libdns implementations offer better performance, lighter dependencies, easier maintainability with growth, and more flexible configuration.

Instructions

First, make sure Caddy is built with this module installed.

Then find the documentation for your DNS provider.

Next, configure the ACME issuer in your Caddy JSON like so:

{
	"module": "acme",
	"dns": {
		"provider": {
			"name": "lego_deprecated",
			"provider_name": "<provider_code>"
		}
	}
}

and replace <provider_code> with the name of your provider, as given in the docs linked above.

Your provider's credentials and other settings are configured via environment variables, which are also described in the docs linked above.

You can also use this with the Caddyfile:

tls {
	dns lego_deprecated <provider_code>
}

and replace <provider_code> with the name of your provider.

Compatibility note

Unlike other modules in the caddy-dns repositories, this one can only be used in the ACME issuer module for solving the DNS challenge. Even though it shares the more general dns.providers namespace with other provider modules, using this module in any other place in your config will result in errors.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegoDeprecated

type LegoDeprecated struct {
	ProviderName string `json:"provider_name,omitempty"`
	// contains filtered or unexported fields
}

LegoDeprecated is a shim module that allows any and all of the DNS providers in go-acme/lego to be used with Caddy. They must be configured via environment variables, they do not support cancellation in the case of frequent config changes.

Even though this module is in the dns.providers namespace, it is only a special case for solving ACME challenges, intended to replace the modules that used to be in the now-defunct tls.dns namespace. Using it in other places of the Caddy config will result in errors.

This module will eventually go away in favor of the modules that make use of the libdns APIs: https://github.com/libdns

func (LegoDeprecated) CaddyModule

func (LegoDeprecated) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (LegoDeprecated) CleanUp

func (ld LegoDeprecated) CleanUp(domain, token, keyAuth string) error

CleanUp wraps the challenge.Provider interface.

func (LegoDeprecated) Present

func (ld LegoDeprecated) Present(domain, token, keyAuth string) error

Present wraps the challenge.Provider interface.

func (*LegoDeprecated) Provision

func (ld *LegoDeprecated) Provision(ctx caddy.Context) error

Provision initializes the underlying DNS provider.

func (*LegoDeprecated) UnmarshalCaddyfile

func (ld *LegoDeprecated) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the DNS provider from Caddyfile tokens. Syntax:

lego_deprecated <provider>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL