Releases: qdm12/ddns-updater
Releases · qdm12/ddns-updater
v2.6.0
Features
- Support CLI flags 🎏 (equivalent to environment variable names)
- Automated binaries releasing on GitHub for commonly used platforms
- IPv6: add JSON parameter
ipv6_suffix
and deprecateIPV6_PREFIX
(retro-compatible change) (#611) - Public IP fetching 📥
- DNS fetching uses DNS over TLS (DoT) only 🔒,
google
removed due to no support for DoT - Ipify support for HTTP "IPv4 or IPv6" fetching
- Remove NoIP HTTP option (only plaintext HTTP fetching)
- Add Spdyn for HTTP IPv4 or IPv6 fetching
- Add ipleak for all HTTP modes
- DNS fetching uses DNS over TLS (DoT) only 🔒,
- Existing providers features ♻️
- DonDominio: add support for subdomains and wildcard host values
- Porkbun: json decode error messages for log messages
- Custom provider ✏️
- Sends HTTP GET request to url given with ip information
- Configurable ipv4 and ipv6 query parameter keys
- Configurable response success detection with a regex
- Treat non status OK 200 responses as failures
- 🆕 Providers
- Shoutrrr 📢
- Bumped from v0.7.0 to v0.8.0
- Add
SHOUTRRR_DEFAULT_TITLE
, disableSHOUTRRR_PARAMS
and only add&title=
parameter to shoutrrr address if it's not set in the address already
- healthchecks.io support with configuration option
HEALTH_HEALTHCHECKSIO_UUID
🩺 - Logging 📜
- Log tree of settings at start
- Shoutrrr debug logs
- "IPv6 is not supported on this system" logged if all IP fetching tries fail with an IPv6 error
- Reduce log spamming: log each IP fetching error at the debug level and log them all at the error level in a single line, if all the fetching tries fail.
LISTENING_ADDRESS
configuration key (#590) to replaceLISTENING_PORT
(retro-compatible change) 👂- Docker images tags are now with and without the
v
prefix. For example:v2.6.0
and:2.6.0
🤷 internal/config
: append:53
to the resolver address if no port is given- More exact times for state updates, events and ban time checking 🕙
Fixes
- Core updating mechanism
- Get database events by IP version (#514)
- Skip update if public IP is not found
- Do not save invalid IP if the public IP is not found
- Set initial fail status if the public ip fetching failed
- Public IP fetching
- IPv6: replace bad regex with custom IPv6 extract function, affects allinkl, dnsomatic, google, he and noip
- Remove plaintext HTTP option
noip
- over HTTPs:
- use address of Cloudflare for "ipv4 or ipv6"
- remove opendns option
- over DNS: add opendns option
- Provider specific fixes
- Desec:
- default host to "@" if empty
- allow wildcard hosts
- DNSOMatic:
- remove username validation regex
- treat 'all' host as proxied to reduce updates, and does the IP comparison using the last IP stored in updates.json.
- DonDominio: update code to use newer
https://dondns.dondominio.com/json
endpoint - DuckDNS:
- send ip address if
"provider_ip": false
- support for IPv6 (#542)
- send ip address if
- Dyn: always give
myip=
parameter,provider_ip
setting disabled - Dynv6: set url ip field as 'auto' when
"provider_ip": true
(#549) - DynDNS: allow wildcard hosts
- Gandi: personal access token support (#568)
- Google: removed since no longer functional
- Infomaniak: handle new response prefixes
- Inwx: fix success codes detection
- Njalla: do not compare ip received when using
"provider_ip": true
- Noip: do not check for received IP when using
"provider_ip": true
- OpenDNS: IP received comparison check fixed
- Porkbun: delete ALIAS record before creating an A or AAAA record
- Spdyn: validate the host field value even if the token is set
- Desec:
- Web UI
- Bump HTTP timeout from 10s to 20s due to slow NoIP servers
- Logging:
- correct IP version for the "ipv4 no lookup" log line
- IPv4 only and IPv6 only debug logging (#513)
- Creation date set correctly by CI
- Settings:
- Ignore echo services absent from
PUBLICIP_FETCHERS
- Web UI listening port validation:
- Check start of unprivileged ports on Linux
- Check if running program has bind capability on Linux
- Ignore echo services absent from
Documentation
- Readme:
- Fix documentation for
SHOUTRRR_DEFAULT_TITLE
- Fix all dead links
- Fix shoutrrr bad link (#609)
- Remove outdated
ddnss
http public ip fetching - Use relative links, now compatible with Docker Hub description sync job
- Fix documentation for
docs/
directory:- fix all dead links
- cloudflare: wildcard hosts are allowed
- gcp: fix typo for provider name (#465)
- dnsomatic: fix settings fields (#463)
- infomaniak: add missing
username
field in example (#467) - opendns: fix bad provider name
dyn
toopendns
in example (#470) - noip: add missing
username
field in example (#469) - inwx:
- fix bad provider name
opendns
->inwx
(#468) - remove trail comma in JSON example
- fix bad provider name
- add missing
provider_ip
field in examples (#466) - add missing
ip_version
parameter for allinkl, name.com, netcup and porkbun - update
ip_version
description for all providers - nowdns:
- add missing
ip_version
parameter - remove trail comma in JSON example
- add missing
- Add Kubernetes examples & documentation (#402)
- Github:
- Update all labels
- More explicit title requirement in issue templates
- Remove automated @qdm12 assignee
- Fix typos (#532)
Maintenance
CI
- Add markdown workflow
- Remove docker hub description workflow
- Build workflow ignores md files for spellcheck
- Add goreleaser steps to build and attach binaries on release
- Bump linter
golangci-lint
from v1.52.2 to v1.55.2 - Add mocks check step
- Force matching Shoutrrr link with go.mod shoutrrr version (#491)
- Add dependabot configuration
- Add build-skip workflow for required workflows
- Bump github/codeql-action from 2 to 3 (#583)
- Bump docker/setup-buildx-action from 2 to 3 (#587)
- Bump docker/metadata-action from 4 to 5 (#585)
- Bump docker/build-push-action from 4.0.0 to 5.1.0 (#582)
Dependencies
- Remove dependency on
golang.org/x/net
- Bump breml/rootcerts from v0.2.11 to v0.2.14
- Bump github.com/miekg/dns from v1.1.42 to v1.1.57
- Bump golang.org/x/net from v0.1.0 to v0.17.0 (#540)
- Bump chi from v1.5.4 to v5.0.11
- Bump Go from 1.20 to 1.21
- Bump Alpine from 3.18 to 3.19
- Bump google.golang.org/grpc from 1.50.1 to 1.56.3 (#552)
- Bump github.com/stretchr/testify from v1.8.1 to v1.8.4
- Bump golang.org/x/mod from v0.12.0 to v0.14.0
Code
- Dockerfile:
- Remove outdated
SHOUTRRR_DEFAULT_TITLE
- Add
HEALTH_SERVER_ADDRESS=127.0.0.1:9999
- Remove outdated
- Migrate from
net.IP*
tonet/netip.Addr
andnet/netip.Prefix
- Drop
github.com/qdm12/golibs
dependencyinternal/persistence/json
: drop dependency on golibspkg/publicip/info
: remove dependency on golibscmd/updater
: replace golibs/connectivity withinternal/health
'sCheckHTTP
functioninternal/settings
: remove dependency onqdm12/golibs/verification
- Configuration reading reworked to use
qdm12/[email protected]
pkg/publicip/dns
: set dial timeout as the value of the parent fetcher timeout- Namecheap: make code only IPv4 compatible
- Servercow: use injected domain instead of re-decoding it from JSON
internal/update
:- simplify shouldUpdateRecord functions
shouldUpdateRecordNoLookup
andshouldUpdateRecordWithLookup
- simplify log calls
- rename run.go to service.go
- simplify shouldUpdateRecord functions
persistence/json
:- simplify
StoreNewIP
method - improve data check error messages
- simplify
internal/data
: remove unusedGetEvents
methodinternal/models
: remove unneededHTML
string alias type- OVH: remove unneeded sentinel errors
internal/provider/providers
:- replace ip nil check with
useProviderIP
check (affects duckdns, infomaniak and namecheap) - review HTTP headers: add missing header(s), remove unneeded headers
- review error wrappings for
client.Do
and wrap using stringdoing http request
- review error wrappings for validation errors
- Use
errors.BadRequest
forbadrequest
responses only - Change HTTP request creation error wrappings to be a string only
- Add missing HTTP request creation error wrappings
- remove intermediary errors and wrap them with strings instead of other sentinel errors
- replace ip nil check with
internal/provider/errors
: review update errors and wrappingsErrBadHTTPStatus
->ErrHTTPStatusNotValid
ErrNumberOfResultsReceived
->ErrResultsCountReceived
ErrNoResultReceived
->ErrReceivedNoResult
ErrAbuse
->ErrBannedAbuse
ErrInvalidSystemParam
->ErrSystemParamNotValid
ErrNoIPInResponse
->ErrReceivedNoIP
ErrUnsuccessfulResponse
->ErrUnsuccessful
- Remove
ErrRequestEncode
andErrRequestMarshal
and wrap errors with string instead - Remove
ErrUnmarshalResponse
and wrap errors with string instead - Add
ErrResponseTooShort
- RemoveErrNotFound
and replace with more precise not found errors - Add
ErrRecordResourceSetNotFound
error - Sort errors list alphabetically
- Change
Empty
->NotSet
- Change
Malformed
->NotValid
internal/shoutrrr
new package- .gitignore: fix
/data
path
Note: re-released as v2.6.0 to have permissions fixed for goreleaser to work (c338c28)
v2.5.0
Features
- 🆕 providers
- Shoutrrr library update to
v0.7.0
- Cloudflare: create record if it does not exist (#477)
- DNSPod: log entire JSON response on error
- Dreamhost: allow to specify a custom
host
- Specify resolver address with the
RESOLVER_ADDRESS
environment variable - Specify resolver timeout with the
RESOLVER_TIMEOUT
environment variable - Retry getting IP address up to 3 times
- Use
github.com/breml/rootcerts
v0.2.11 for TLS certs - Add destination to notification errors
- Add GHCR registry image (#259)
pkg/publicip/info
package (#189)pkg/publicip
: do not use providers banning us
Fixes
- Cloudflare:
key
->userServiceKey
variable name (#462)- fix service key regex
- dd24:
- API call and fix (#236)
- Handle non-empty responses
- ddnss.de add
dual_stack
parameter (#270, thanks @quantum-byte) - DNSOMatic:
- allow email addresses as
user
field - remove password regex check
- allow email addresses as
- DNSPod add IPv6 record ID finder
- FreeDNS fix
no ip change
messages decoding - Linode fix error decoding and set
name
field when creating record - LuaDNS match configured host instead of first record (#249)
- Namecheap XML decoding error & allow empty IP field in response
- OVH:
- fix signature in api mode
- support
nochg
responses
- Spdyn response handling for
good
andnochg
SHOUTRRR_ADDRESSES
case sensitivity fixed- Write JSON file from CONFIG variable
- DNS public IP fetching timeout fixed
- Better error messages for JSON decoding errors
- Shoutrrr validation error wrapping
Maintenance
- Fix line endings to lf (#220)
- Remove microbadger which went EOL
- Remove unneeded
/tmp/data
directory in Dockerfile - Use
github.com/qdm12/gosplash
for program start log information - Update
.devcontainer
definition files and readme
Code health
- General refactoring involving:
- Return concrete structs instead of interfaces
- Accept locally defined interfaces as narrow as possible
- Export returned struct types from exported functions
- Do not export interfaces for other packages to use
- Define and use sentinel errors
- Wrap all sentinel errors
- Use string comparisons instead of length for string variables
- Remove short if error checks
- Interface composition for Database
- HTTP client logger middleware
internal/backup
package refactorinternal/health
: remove unneededlogger
argument from functionsinternal/settings/*
: validate using local regexesinternal/settings/dyn
: change JSON field tag frompassword
toclient_key
(with retro-compatibility)internal/settings/providers/dyn
: more information on bad request errorinternal/settings/providers/ovh
: Add error context to errorsinternal/settings/providers
: rework IP string search code- Change database id to be
uint
instead ofint
- Remove
GetAllDomainsHosts
database method - Return
string
instead oferror
when appropriate (linode)
Linting
- Upgrade golangci-lint from v1.41.1 to v1.52.2
- Enable all default linters
- Add linters and fix new errors:
ireturn
,revive
,asasalint
,bidichk
,containedctx
,cyclop
,decorder
,durationcheck
,errchkjson
,errname
,errorlint
,execinquery
,forcetypeassert
,gomoddirectives
,grouper
,interfacebloat
,maintidx
,makezero
,nilnil
,nosprintfhostport
,promlinter
,reassign
,tenv
,usestdlibvars
,goerr113
,dupword
.paralleltest
,musttag
,gocheckcompilerdirectives
- Remove deprecated linters:
deadcode
,structcheck
andvarcheck
- Update exclude rules
Build
- Upgrade Go from 1.16 to 1.20
- Remove unneeded alpine
tzdata
package - Upgraded Alpine from 3.13 to 3.18
CI
- Allow slash in branch name for docker image tags (#219)
- Remove go modules tidy check
- Add UID and GID build arguments
- Bump GitHub actions versions (#353)
- Restrict publish image trigger events
Dependencies
- Use
github.com/qdm12/log
instead of logger fromgithub.com/qdm12/golibs
- Upgrade
qdm12/goshutdown
from v0.1.0 to v0.3.0 - Upgrade
github.com/qdm12/golibs
- Wrap errors in config package with environment variable name
- Update logger
Documentation
- Fix links in
.github/CONTRIBUTING.md
Readme
- Document
RESOLVER_ADDRESS
environment variable - Add Build the image section
- Clarify how to use another user ID for the container
- Rework metadata badges
- Fix lint errors
- Remove
sanitize
query parameter from svg tag - Autoformat document
./docs
v2.4.1
v2.4.0
Features
- Support for domaindiscount24.com (#207)
- Support Shoutrrr addresses
PUBLICIP_DNS_TIMEOUT
variable
Bug fixes
- Wildcard hosts (#214)
- Keep multi-dots wildcard host structure in display strings
- Use a function
BuildURLQueryHostname
for API calls to send the correct wildcard hostname - Send the wildcard character in API calls
- Fix behavior for wildcard hosts for: cloudflare, ddnss.de, digitalocean, dnsomatic, dreamhost, dyn, dynv6, google, informaniak, njalla, noip, opendns, ovh, selfhost.de, spdyn, strato and variomedia
- Healthcheck query to
127.0.0.1:port
instead of for example0.0.0.0:port
DATADIR
defaults to/updater/data
- Server listens on all interfaces (IPv4 and IPv6) instead of just
0.0.0.0
- Context dependent DNS resolutions (to exit the program promptly)
- Larger default timeout of 3s for DNS query of public IP
Documentation
- Add missing architectures to readme:
ppc64le
,s390x
,riscv64
andarmv6
Maintenance
internal/config
package for environment variables- Remove
github.com/ovh/go-ovh
dependency - Use
time/tzdata
anonymous import instead of Alpine'stzdata
- Use
github.com/qdm12/goshutdown
to handle program shutdown - Simplify file paths logic
- Use
signal.NotifyContext
(introduced with Go 1.16) - Inject more objects to
_main()
in main.go:params.Env
os.Args
- a default parent logger
- More robust main logic
- Change
main()
to encapsulate_main()
and handle OS signals itself _main()
returns an error instead of an exit code
- Change
- Move
setupGotify
inline in_main()
function - Local scoped
buildInfo
variable - Optimize Dockerfile for faster rebuilds, better layer caching and faster cross-builds
- Pull
xcputranslate
for build platform only (faster x-builds) - Install
golangci-lint
from qmcgaw/binpot (faster) - Install
g++
in base stage (for caching) - Copy
xcputranslate
in base stage (for caching) - Install
golangci-lint
in base stage (for caching) - Push
ARG TARGETPLATFORM
down in build stage (faster x-builds) - Push versioning
ARG
s andLABEL
down in final stage (for caching) - Move data directory
COPY
up in final stage (for caching)
- Pull
- Upgrade
golangci-lint
tov1.41.1
- Upgrade
qmcgaw/xcputranslate
tov0.6.0
- Set Docker test stage entrypoint in Dockerfile instead of CI
v2.3.0
Features
- HTTP and DNS Public IP fetching options (#136, #187)
- Njalla support (#180, #181)
- SPDyn support (#182, #179)
- Variomedia support (#208, #174)
- Allow to run without settings
debug
log levelHEALTH_SERVER_ADDRESS
to change the internal health server listening address- Request URL and body debug logs for each provider
Fixes
- Read
CONFIG
environment variable with case sensitivity (#192) - thanks @mchill - Dreamhost: create record before removing outdated one (#206)
ipversion
display (#190)ROOT_URL
behavior when served outside of root (bug introduced withgo-chi
)IPV6_PREFIX
support to avoid unneeded updates when using IPV6
Maintenance
- Use embed for static UI (#134)
internal/settings
shared code in sub packages- Move settings construction from
internal/params
tointernal/settings
- Split each provider in own subpackage in
internal/settings
- Rename each provider file to
provider.go
- Upgrade all Go dependencies
- Upgrade devcontainer settings
- Upgrade linting setup with Golangci-lint to
v1.40.1
- Add more linters
- Remove rules from
.golangci.yml
in favor of inline//nolint:
comments - Remove
regex.Matcher
arg if not needed for some providers - Common receiver struct for all providers
- Use
io
instead ofioutil
whenever possible
v2.2.0
v2.1.0
Features
- Only call the DNS APIs if the public IP address changes (#63)
- Only one ip method per ip version (ipv4, ipv6, ipv4/v6) (#63)
- Fetches the public ip address once every period for all records (#63)
- Support to update ipv4 and ipv6 records separately
- Support multiple comma separated hosts for each setting
- Read the JSON configuration from an environment variable
CONFIG
(#62) - New IP fetch methods:
- New DNS providers support:
- Cloudflare: obtain identifier programmatically (#71)
- IPv6 support for all providers except Namecheap (#71 & #72)
- Resolve IP addresses for each fqdn to compare with the public IP address obtained, instead of comparing with persisted values
- Better log messages when IP address changes
- Handle Cloudflare proxied records (#104)
- Stop sending updates when record is in abuse state for a cooldown period
UPDATE_COOLDOWN_PERIOD
(#140) - OVH allow domain parameter (#111)
- OVH subdomains (*) support with zone DNS (#154)
- DDNSgopher favicon (#159)
- Debug logs with debug log level
- 5-tries DNS resolution per record hostname
Bug fixes
- Cloudflare named as
Dreamhost
on Web UI (#79) - Accept Cloudflare tokens with a
-
in them (#86) - Remove regex domain check (#92)
- Remove regex check for Clouidflare API key (#101)
- Accept email addresses with
+
in them (#112) - Accept GoDaddy new key format (#113 and #169)
- Listening port defaults to
8000
outside Docker (#152) - Remove GoDaddy secret regex check
Changes
- DuckDNS setting changed to
host
instead ofdomain
- Replace
no_dns_lookup
option withproxied
option only valid for Clouflare (#160)
Documentation
- Add issue templates
- Readme improved (#106, #151, #165, #167)
- Readme sections moved to docs (#128) (thanks @gauravspatel)
- Timezone
TZ
variable (#90) - DuckDNS documentation fix (#171)
- DDNSgopher logo in readme (#157)
- Architecture section in readme
Maintenance
- DNS provider names sorted alphabetically
UNSET
status before a record gets updated the first time- Using Alpine 3.13 and Go 1.16 for building the binary
- Update Go modules dependencies
- Refactor HTTP servers (#164)
- Rework current server
- Update call is blocking
- Run first update without blocking
- Build information written to Go binary at build
- Use native
http.Client
(#145) withhttp.NewRequestWithContext
instead of custom client interface - Remove uuid dependency
- Streamline HTTP headers setting
- Logger upgraded with golibs (using native
log
instead of Uber's zap) (#170) - Replace
DNSLookup()
method name withProxied()
(#160)
Dev tooling
- Update dev container settings
- Go extension
- Remove rewrap extension
- SSH bind mount as read write
- Remove local vscode directory
- Upgrade golangci-lint to 1.37.0
- Add more Go linters to .golangci.yml
- Removed some Github workflows
- Greetings doesn't work on forked PRs
- Misspell is done with golangci-lint
- Security workflow doesn't run on Scratch based docker images
- Default
BUILDPLATFORM=linux/amd64
for older Docker builds - Improve Github Actions workflows to build images for all branches and releases
Scratch based Docker image
- No SQLite support
- JSON file stored data
- Periodic backup
Stable release and backward compatible with SQlite
Associated Docker image tag is also v1
- Web UI (only display)
- Support for A records update for GoDaddy, Namecheap, Cloudflare, Dreamhost, NoIP, DNSPod, Infomaniak, ddnss.de and DuckDNS
- Support for AAAA records update for Infomaniak and ddnss.de
- Using JSON file for persistence of changes, with SQLite for backward compatibility
- Compatible with Gotify
- Docker healthcheck
- Multiple IP methods available