-
-
Notifications
You must be signed in to change notification settings - Fork 207
Maintenance: Update dependencies, add CI, fix reverse lookups, and add shell completions #146
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
Open
l1a
wants to merge
48
commits into
ogham:master
Choose a base branch
from
l1a:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ip6.arpa and to parse correctly.
Adds a pseudo record type "ANY" that queries the given domain for all known record types. This is implemented by adding an `all_record_types()` function that returns a vector of all `RecordType` variants. The command-line option parsing logic is updated to check for "ANY" and, if present, populate the record_types field with the list of all record types. The test suite has been updated to reflect this new functionality.
Removes the `specsheet` dependency and the entire `xtests` directory. This simplifies the testing setup and removes a dependency that is not consistently available.
This reverts commit 47173a4.
- Add support for DNSSEC record types: * DS (Delegation Signer) - RFC 4034 * RRSIG (DNSSEC Signature) - RFC 4034 * NSEC (Next Secure) - RFC 4034 * DNSKEY (DNS Key) - RFC 4034 * NSEC3 (Next Secure v3) - RFC 5155 * NSEC3PARAM (NSEC3 Parameters) - RFC 5155 * IPSECKEY (IPsec Key) - RFC 4025 * DHCID (DHCP Identifier) - RFC 4701 - Add support for SMIMEA record type (S/MIME certificate association) - RFC 8162 - Implement full parsing, validation, and display for all new record types - Add JSON output serialization for all new types - Add colored terminal output for new record types - Include comprehensive test coverage for all new implementations - Fix compilation issue: missing closing brace in output match statement - Improve ANY query handling: suppress Format Error when server provides records - Update all integration points: parsing, display, JSON, and coloring All new record types follow the established patterns for error handling, length validation, and output formatting. Tests pass for all implementations.
- Add comprehensive DNSSEC record type documentation: * DS, DNSKEY, RRSIG, NSEC, NSEC3, NSEC3PARAM records * DHCID, IPSECKEY, SMIMEA records - Update README.md with enhanced description and examples: * Mention comprehensive DNSSEC support * Add examples for DS, DNSKEY, and RRSIG queries - Update man page (dog.1.md): * Add all new record types to RECORD TYPES section * Include RFC references for each type * Update version to reflect current development state All documentation now accurately reflects the extended DNS record type support.
…type support - Add full support for DNSSEC record types: * DS (Delegation Signer) - RFC 4034 * RRSIG (DNSSEC Signature) - RFC 4034 * NSEC (Next Secure) - RFC 4034 * DNSKEY (DNS Key) - RFC 4034 * NSEC3 (Next Secure v3) - RFC 5155 * NSEC3PARAM (NSEC3 Parameters) - RFC 5155 * IPSECKEY (IPsec Key) - RFC 4025 * DHCID (DHCP Identifier) - RFC 4701 * SMIMEA (S/MIME certificate association) - RFC 8162 - Implement complete parsing, validation, and display for all record types - Add JSON serialization support for all new types - Add colored terminal output for new record types - Include comprehensive unit tests and documentation updates - Fix compilation issues and improve ANY query handling This merge brings enhanced DNSSEC support and extended record type capabilities to the main branch.
This commit refactors the entire crate to use the `hickory-resolver` library for all DNS resolution, removing the custom `dns` and `dns-transport` crates. This change simplifies the codebase, improves maintainability, and leverages a well-tested, feature-rich library for future development. Major changes include: - **Dependency Change:** Removed local `dns` and `dns-transport` crates and added `hickory-resolver` and `tokio` to `Cargo.toml`. - **Async Refactor:** The `main` function and DNS lookups are now fully asynchronous using the `tokio` runtime. - **Code Simplification:** Deleted the entire custom DNS protocol and transport implementation, including modules for requests, responses, wire formatting, and connection handling. - **Option Parsing:** The `options` module was significantly simplified to remove arguments related to the old resolver's implementation details, such as EDNS, transaction IDs, and protocol tweaks. - **Output Formatting:** The `output` and `table` modules were updated to work with the response types from `hickory-resolver`. Color-coding for different record types has been reintroduced. - **Testing:** Unit tests for command-line option parsing and output formatting have been updated or added to reflect the new implementation. - **Documentation:** The `README.md` and man page have been updated to remove references to unsupported features and reflect the new, simplified command-line options.
This commit adds documentation to all public modules, functions, and structs in the `src` directory. This improves the maintainability and readability of the codebase. - **`src/colours.rs`:** Added doc comments to the `Colours` struct and its fields. - **`src/hints.rs`:** No changes were needed as the documentation was already sufficient. - **`src/logger.rs`:** Added doc comments to the `configure` function and the `Logger` struct. - **`src/main.rs`:** Added doc comments to the `main` and `run` functions, as well as the helper functions for displaying usage and version information. - **`src/options.rs`:** Added doc comments to the `Requests` struct and its fields, as well as the private functions in the `Inputs` implementation. - **`src/table.rs`:** Added doc comments to the private functions.
This commit introduces a new command-line option, `-l` or `--list`, which displays a comprehensive table of all known and queryable DNS record types supported by the application. - **`src/options.rs`:** Added the `--list` flag and a new `ListTypes` variant to the `OptionsResult` enum. A new function `all_record_types` was added to provide the data for the table. - **`src/main.rs`:** Added logic to handle the `ListTypes` variant and print the formatted table to the console. - **`src/usage.txt`:** Updated the help text to include the new option. - **`README.md` and `man/dog.1.md`:** Updated the documentation to include the new option and the list of supported record types.
This commit bumps the version of the application to 0.4.0-pre to reflect the recent feature additions and refactoring. - **`Cargo.toml`:** Updated the package version. - **`man/dog.1.md`:** Updated the version in the man page.
This commit introduces a new `-v, --verbose` option to display detailed information about the DNS query, including the transport protocol, nameserver, and timing information. Major changes include: - **`src/options.rs`:** Added the `--verbose` flag and re-introduced the `TransportType` enum to support transport protocol selection. - **`src/main.rs`:** Implemented the verbose output format and added robust logic to handle nameservers specified by IP address or domain name for all transport protocols, including TLS and HTTPS. - **`src/output.rs`:** Updated the `print` function to handle the new verbose output format. - **Documentation:** Updated `README.md`, `man/dog.1.md`, and `src/usage.txt` to reflect the new `--verbose` option and the change of the version flag from `-v` to `-V`.
The verbose output will now display a comma-separated list of all the nameservers being queried, rather than just the first one.
When the --verbose flag is used, the 'Query for...' lines will now be immediately followed by their corresponding results. This makes the output easier to follow when querying for multiple record types.
Refactor the command-line argument parsing to correctly determine the transport type (UDP, TCP, TLS, HTTPS) before parsing other options. This fixes a bug where using a flag such as --tls along with a nameserver specified with the '@' syntax (e.g., @1.1.1.1) would fail because the transport type was not being correctly identified.
The 'ANY' query type should not include PTR records, as these are used for reverse lookups (IP to domain) and do not make sense when querying for a domain name. This commit removes the PTR record type from the list of records queried when the 'ANY' type is specified.
…blocks and verbose diagnostics
…better performance
…nd dev optimizations
- Remove measure_time from Options struct and related logic - Update shell completions for fish, PowerShell, and zsh - Update README, man page, and usage help message - Remove unused from_args function and MultipleTransports error - All tests pass and compile warnings resolved
- Replace ResolverConfig::default() with manual loading of system DNS servers - On Unix: Parse /etc/resolv.conf to get nameservers - On Windows: Use ipconfig crate to retrieve DNS servers from adapters - Add fallback to Google DNS if no system nameservers found - Add comments explaining the cross-platform logic - Suppress false positive unused import warnings Fixes issue where default resolver didn't use system's DNS server on some platforms.
…cation - Previously, build.rs added the tagline 'dog ○ command-line DNS client' and usage.txt started with the same, causing the --help text to show the description twice. - Now usage.txt starts with 'Usage:' directly, avoiding the duplication while keeping the colored title from build.rs.
- Change version in Cargo.toml and Cargo.lock from 0.4.0-pre to 0.4.1-pre - Update man/dog.1.md header to reflect new version - Remove unused feature-checking code from build.rs that added [-idna, -https] to version output - The features did not exist as Cargo features nor gate any code, so they were misleading
- Adds a new recipe that installs the release version locally using 'cargo install --path .' - Useful for quickly installing the updated binary after builds
- Removed fuzz, fuzz-hex, fuzz-clean recipes that referenced non-existent dns crate - Removed test-mutation recipe that referenced non-existent dns package and features - Project now uses hickory-resolver instead of local dns crate
- Updated hickory-resolver to 0.24 (latest stable) - Updated tokio, rand, and other deps to latest within compatibility - Removed obsolete fuzz and mutation recipes - Pinned to stable hickory-resolver to avoid breaking changes in 0.25
- Fix indentation in resolver config matching - Pass &data to record_payload_summary as expected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR bundles several maintenance updates, fixes, and features accumulating in my fork.
Summary of Changes
Cargo.lockandCargo.toml. Removedopenssl-sysandnative-tlsin favor of a simplified build/TLS approach..github/workflows/rust.yml) to ensure build and test stability.src/options.rs.This ensures the project is up-to-date with modern Rust tooling and provides better cross-platform stability with the CI.