[GH-ISSUE #1663] New CLI for trust-dns-client, dns #728

Closed
opened 2026-03-16 00:02:13 +03:00 by kerem · 0 comments
Owner

Originally created by @bluejekyll on GitHub (Mar 19, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1663

I've been working on a CLI for trust-dns-client. It's not ready for review. I'm opening this issue mainly to get early feedback. The branch is here: https://github.com/bluejekyll/trust-dns/blob/trust-dns-client-cli/util/src/dns.rs

Here is the current help, with capabilities:

$ cargo run --all-features --bin dns -- -h
trust dns client 0.21.1
A CLI interface for the trust-dns-client

USAGE:
    dns [OPTIONS] --nameserver <NAMESERVER> <SUBCOMMAND>

OPTIONS:
        --class <CLASS>
            The Class of the record [default: IN]

        --debug
            Enable debug and all logging

        --error
            Enable error logging

    -h, --help
            Print help information

        --info
            Enable info + warning + error logging

    -n, --nameserver <NAMESERVER>
            Specify a nameserver to use, ip and port e.g. 8.8.8.8:53 or \[2001:4860:4860::8888\]:53
            (port required)

    -p, --protocol <PROTOCOL>
            Protocol type to use for the communication [default: udp] [possible values: udp, tcp,
            tls, https, quic]

    -t, --tls-dns-name <TLS_DNS_NAME>
            TLS endpoint name, i.e. the name in the certificate presented by the remote server

    -V, --version
            Print version information

        --warn
            Enable warning + error logging

    -z, --zone <ZONE>
            Zone, required for dynamic DNS updates, e.g. example.com if updating www.example.com

SUBCOMMANDS:
    append           Append record data to a record set
    create           Create a new record in the target zone
    delete-record    Delete a single record from a zone, the data must match the record
    help             Print this message or the help of the given subcommand(s)
    notify           Notify a nameserver that a record has been updated
    query            Query a name server for the record of the given type

Mainly I'm seeking information on an MVP. It's probably pretty close at this point and just needs to be cleaned up. Some notes, quic isn't yet implemented and the TLS verification is currently hacked (it doesn't perform serverside validation right now) for some testing, that will be fixed of course, but probably needs to allow for some custom certificate loading options, etc.

Anyway, use this for talking about features you wish this had that dig doesn't. This library uses the zone rdata parsing from the trust-dns server library, so it supports all the record types that the server does for parsing rdata off the CLI.

Originally created by @bluejekyll on GitHub (Mar 19, 2022). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1663 I've been working on a CLI for trust-dns-client. It's not ready for review. I'm opening this issue mainly to get early feedback. The branch is here: https://github.com/bluejekyll/trust-dns/blob/trust-dns-client-cli/util/src/dns.rs Here is the current help, with capabilities: ```shell $ cargo run --all-features --bin dns -- -h trust dns client 0.21.1 A CLI interface for the trust-dns-client USAGE: dns [OPTIONS] --nameserver <NAMESERVER> <SUBCOMMAND> OPTIONS: --class <CLASS> The Class of the record [default: IN] --debug Enable debug and all logging --error Enable error logging -h, --help Print help information --info Enable info + warning + error logging -n, --nameserver <NAMESERVER> Specify a nameserver to use, ip and port e.g. 8.8.8.8:53 or \[2001:4860:4860::8888\]:53 (port required) -p, --protocol <PROTOCOL> Protocol type to use for the communication [default: udp] [possible values: udp, tcp, tls, https, quic] -t, --tls-dns-name <TLS_DNS_NAME> TLS endpoint name, i.e. the name in the certificate presented by the remote server -V, --version Print version information --warn Enable warning + error logging -z, --zone <ZONE> Zone, required for dynamic DNS updates, e.g. example.com if updating www.example.com SUBCOMMANDS: append Append record data to a record set create Create a new record in the target zone delete-record Delete a single record from a zone, the data must match the record help Print this message or the help of the given subcommand(s) notify Notify a nameserver that a record has been updated query Query a name server for the record of the given type ``` Mainly I'm seeking information on an MVP. It's probably pretty close at this point and just needs to be cleaned up. Some notes, `quic` isn't yet implemented and the TLS verification is currently hacked (it doesn't perform serverside validation right now) for some testing, that will be fixed of course, but probably needs to allow for some custom certificate loading options, etc. Anyway, use this for talking about features you wish this had that `dig` doesn't. This library uses the zone rdata parsing from the trust-dns server library, so it supports all the record types that the server does for parsing rdata off the CLI.
kerem 2026-03-16 00:02:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#728
No description provided.