Categorygithub.com/0xfelix/hetzner-dnsapi-proxy
modulepackage
0.0.0-20241224104534-1164399a884c
Repository: https://github.com/0xfelix/hetzner-dnsapi-proxy.git
Documentation: pkg.go.dev

# README

hetzner-dnsapi-proxy

hetzner-dnsapi-proxy proxies DNS API update requests to the Hetzner DNS API.

Authorization takes place via a list of domains and host addresses allowed to update them for now.

Container image

Get the container image from ghcr.io

TODO

  • More elaborate authentication / authorization mechanism
  • Add tests

Supported DNS APIs

APIEndpoint
lego HTTP requestPOST /httpreq/present
POST /httpreq/cleanup (always returns 200 OK)
(see https://go-acme.github.io/lego/dns/httpreq/)
ACMEDNSPOST /acmedns/update
(see https://github.com/joohoi/acme-dns#update-endpoint)
DirectAdminGET /directadmin/CMD_API_SHOW_DOMAINS
GET /directadmin/CMD_API_DNS_CONTROL (only adding TXT records, everything else always returns 200 OK)
GET /directadmin/CMD_API_DOMAIN_POINTER (only a stub, always returns 200 OK)
(see https://www.directadmin.com/api.php and https://www.directadmin.com/features.php?id=504)
plain HTTPGET /plain/update (query params hostname and ip)

Environment variables

VariableTypeDescriptionRequiredDefault
API_TOKENstringAuth token for the APIY
API_TIMEOUTintTimeout for calls to the API in secondsN15 seconds
RECORD_TTLintTTL that is set when creating/updating recordsN60 seconds
ALLOWED_DOMAINSstringCombination of domains and CIDRs allowed to update them, example:
example1.com,127.0.0.1/32;_acme-challenge.example2.com,127.0.0.1/32
Y
LISTEN_ADDRstringListen address of hetzner-dnsapi-proxyN:8081
TRUSTED_PROXIESstringList of trusted proxy host addresses separated by commaNTrust all proxies

# Packages

No description provided by the author