loopia

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 3 Imported by: 0

README

Loopia DNS module for Caddy

This module contains a DNS provider package for Caddy. It can be used to manage DNS records with the Loopia API.

Loopia API

WARNING: This will only properly work if you set propagation_timeout. Loopia can use up to 15 minutes, but usually less, to propagate the changes so a high enough timeout is needed, default is 2 minutes. You can set the propagation_timeout value to compensate for this.

Loopia API account requirements

You will need to create a API user account that is separate from the normal Loopia user account.

The API user will need to have access to the following methods.

  • getSubdomains
  • addSubdomain
  • removeSubdomain
  • getZoneRecords
  • addZoneRecord
  • removeZoneRecord

Caddy module name

dns.providers.loopia

Config examples

This can be used together with the ACME DNS challenge.

Caddyfile

You can put the config in a Caddyfile tls block. Note that caddyserver/caddy#4177 must be solved before propagation_timeout is supported in Caddyfile.

tls {
    issuer acme {
        propagation_timeout "15m0s"
        dns loopia {
                username "<your user>@loopiaapi"
                password "<your password>"
        }
    }
}
Full example Caddyfile
somehost.example.org
tls {
        issuer acme {
                email "<your email for acme notifications>"
                propagation_timeout "15m0s"
                dns loopia {
                        username "<api user>@loopiaapi"
                        password "<api password>"
                }
        }
}
respond "Hello, world!"
JSON

Using JSON notation with the ACME module.

{
    "module": "acme",
    "challenges": {
        "dns": {
            "propagation_timeout": "15m0s",
            "provider": {
                "name": "loopia",
                "username": "<your user>@loopiaapi",
                "password": "<your password>"
            }
        }
    }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *libdnsloopia.Provider }

func (Provider) CaddyModule

func (Provider) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Provider) Provision

func (p *Provider) Provision(ctx caddy.Context) error

Provision sets up the module. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

func (p *Provider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

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

loopia [<username> <password>] {
    username <username>
    password <password>
    customer <customer no>
}

Jump to

Keyboard shortcuts

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