MCDDNS
Mike Conigliaro's industrial-strength Dynamic Domain Name System client
Features
- Extensible plugin-oriented architecture with a simple API
- Address providers are responsible for obtaining an address
- DNS providers are responsible for managing a DNS record
- Resilient against network and endpoint failures
- Built-in result validation for address providers
- Use multiple address providers (keep trying until one succeeds)
- Optional retry with Fibonacci backoff
- Cron mode (prevents email flood if your Internet connections goes down)
- Detailed logging
- Dry-run mode (shows what will happen without changing anything)
Built-In Providers
Address Providers
aws.CheckIP: Obtains a public IPv4 address via Amazon Web Servicesdyn.CheckIP: Obtains a public IPv4 address via Dyngoogle.CheckIP: Obtains a public IPv4 address via Google Domainsipify.IPv4: Obtains a public IPv4 address via ipifyipify.IPv6: Obtains an IPv6 address via ipify
DNS Providers
aws.Route53: Manages records in Amazon Route53
Installation
pip install mcddns
Running the Application
mcddns <dns_provider> <fqdn> [options]
Use --help to see available options.
Development
Getting Started
poetry install
poetry shell
...
Running Tests
pytest
Writing Providers
A provider is any class that inherits from AddressProvider or DNSProvider. In production mode, Python modules/packages prefixed with mcddns_ will automatically be imported from the following locations:
$XDG_CONFIG_HOME/mcddns/provider/etc/mcddns/provider- sys.path
Example: If you create a file at $XDG_CONFIG_HOME/mcddns/provider/mcddns_foo.py with a class named Bar that inherits from one of the Provider subclasses, your module can be referenced (e.g. in command-line options) as foo.Bar.
Provider Methods
Each provider type has a set of methods that will be called in a particular order. Note that some of these methods are expected to return a specific value in order to progress to the next step.
All Providers
options_pre(parser): Runs before option parsing. Use this method to add your own provider-specific command line arguments (See: argparse).options_post(parser, options): Runs after option parsing. Use this method to do things with your provider-specific command line arguments.
Address Providers
fetch(options): Fetches and returns an IP address, hostname, etc.validate(options, address): ReturnsTrueif the address is valid andFalseotherwise
DNS Providers
check(options, address): ReturnsTrueif a DNS update is required andFalseotherwiseupdate(options, address): ReturnsTrueif a DNS update was successful andFalseotherwise
Examples
I'll write more documentation if people are interested, but for now, see the examples at mcddns/provider and tests/provider.
Releases
- Bump
versionin pyproject.toml - Update CHANGELOG.md
- Run
make release
To Do
- Add tests for built-in providers
Metadata
Release files for mcddns 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcddns-1.2.0.tar.gz | 10.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcddns-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / mcddns-1.2.0.tar.gz
| Download URL | mcddns-1.2.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bfc89a332fecf5e1f53734e69a6a5af897f7ba026beac9c66b8dca9a5970a12
|
|
BLAKE2b-256 checksum How to use checksums |
c6a3e758f86bed69ac9a69cc2f1c8a580d3d6399cad011fcb4e7f06f1aa473f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0
|
Release files / mcddns-1.2.0-py3-none-any.whl
| Download URL | mcddns-1.2.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff61e2551bf943206436788d83dcba9bc7bb5300c1651d8a80952b5e94ef02e8
|
|
BLAKE2b-256 checksum How to use checksums |
aa0392bc64d57eafa7c02126e476ea8d5fc6667dd79b8341cdbe85c269112bdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0
|
Security for mcddns 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.