Skip to content

Enable support for a plethora of more DNS types. #24

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

Merged
merged 4 commits into from
Aug 19, 2025

Conversation

patrickdappollonio
Copy link
Owner

The current DNS list, although it works, was a bit limiting. Recently I've needed to make a CAA query and this tool technically should support it but wasn't available in the list of options.

This PR open the floodgates for all dns query types supported by miekg/dns.

Copilot

This comment was marked as outdated.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables support for all DNS record types available in the miekg/dns package, replacing the previous hardcoded list of 9 specific DNS record types with dynamic support for the full range of DNS types. This addresses the limitation where users needed to query DNS record types like CAA that weren't previously available.

  • Replaced hardcoded enum list with dynamic generation from dns.StringToType map
  • Refactored ConvertToQType function to use the dns.StringToType lookup instead of a switch statement
  • Added alias import to avoid naming conflicts between the external miekg/dns package and internal dns package

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/server/server.go Added dynamic DNS record type enumeration and import aliasing to support all DNS types
internal/dns/dns.go Simplified DNS type conversion logic and added CAA record parsing support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@patrickdappollonio patrickdappollonio merged commit d2e19cd into main Aug 19, 2025
2 checks passed
@patrickdappollonio patrickdappollonio deleted the add-more-dns-types branch August 19, 2025 03:15
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

Successfully merging this pull request may close these issues.

1 participant