Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve dnst update user interface and functionality? #42

Open
mozzieongit opened this issue Nov 29, 2024 · 0 comments
Open

Improve dnst update user interface and functionality? #42

mozzieongit opened this issue Nov 29, 2024 · 0 comments

Comments

@mozzieongit
Copy link
Member

While reviewing #10 I mentioned that:

  1. we should improve on the interface a bit (the "none" in place of an IP address for deletion is bugging me in particular)
  2. that it might be useful for dnst update to be able to update more than just A/AAAA records, like TXT records (e.g. for acme challenges).

An initial idea would be the following interface variants:

Variant A

Synopsis:

  • dnst update [options] add <domain name> <RRTYPE> <RRs>...
  • dnst update [options] delete <domain name> <RRTYPE> [<RRs>...]
  • dnst update [options] clear <domain name> (this distinction is to avoid accidental deletion of whole domain names, but might be unnecessary)

Examples:

  • dnst update add <domain name> AAAA "::1" "::2"
    • Add multiple AAAA records
  • dnst update add <domain name> TXT "challenge"
    • Add multiple TXT records
  • dnst update delete <domain name> AAAA ::1 ::2
    • Delete exact AAAA RRs on domain name (::1 and ::2 in this case)
  • dnst update delete <domain name> AAAA
    • Delete all AAAA RRs on domain name
  • dnst update clear <domain name>
    • Delete all RRSETs on domain name, aka delete the whole domain name

Variant B

(like above, but as options for different RR types at once)

Alternatively prove RRs as options, to be able to update multiple different RR types at once:

  • dnst update add <domain name> --a 1.1.1.1 --aaaa ::1 --txt "hello world"
    • Add all these records with the TTL determined from the SOA RR
  • dnst update delete <domain name> --a 1.1.1.1 --aaaa ::1 ...
    • Delete these exact records if they exist
  • dnst update clear <domain name> --a --aaaa
    • (differs from (A): Delete specific RRSETs on domain name

The update [options] could then set the --ttl and maybe even --class (but that is probably rarely helpful).

I like variant (A) more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant