binarylane

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 3 Imported by: 0

README

Binary Lane module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records in zones hosted by Binary Lane, an Australian cloud provider.

Caddy module name

dns.providers.binarylane

Configuration

The module needs one thing: an API token from the Binary Lane control panel. Create it under Account → API Tokens; the DNS endpoints are covered by a general-purpose token.

Prefer {env.BINARYLANE_API_TOKEN} over writing the token into the config, so it is not sitting in a file Caddy reads at startup.

Caddyfile
tls {
	dns binarylane {env.BINARYLANE_API_TOKEN}
}

Or, equivalently, with the token as a subdirective:

tls {
	dns binarylane {
		api_token {env.BINARYLANE_API_TOKEN}
	}
}

api_base is also accepted, and defaults to https://api.binarylane.com.au/v2/. It exists for testing against a stand-in server and should not normally be set.

JSON

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "binarylane",
				"api_token": "{env.BINARYLANE_API_TOKEN}"
			}
		}
	}
}

A note on TTL

Binary Lane fixes the TTL of every record at 3600 seconds and rejects any request that tries to change it. The provider therefore never sends a TTL, and a short one asked for by an ACME client is silently served as 3600. This does not affect DNS-01: the challenge record is created, validated and removed, and the TTL only means a resolver may cache the absence of it beforehand. See the provider README for the detail.

Building

xcaddy build --with github.com/caddy-dns/binarylane

Documentation

Overview

Package binarylane registers the Binary Lane libdns provider as a Caddy DNS module, so Caddy can solve ACME DNS-01 challenges in a Binary Lane zone.

It is a separate Go module from the provider itself: the provider depends on nothing but libdns, and nothing that imports it should have to pull in Caddy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *binarylane.Provider }

Provider wraps the provider implementation as a Caddy module.

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 resolves placeholders in the config before it is used, which is how the API token arrives from an environment variable rather than being written into the Caddyfile. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

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

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

binarylane [<api_token>] {
    api_token <api_token>
    api_base  <url>
}

Jump to

Keyboard shortcuts

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