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

refactor: use replace syntax to import zdns/dns #468

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Conversation

developStorm
Copy link
Member

@developStorm developStorm commented Oct 31, 2024

This change enables data type compatibility for interoperability with libraries that reference miekg types. Currently, it allows us to import go-dns-root-anchors, but it also provides future extensibility. If we introduce other dependencies that rely on miekg/dns, this adjustment will enable us to transparently replace miekg/dns with our version.

Additionally, it ensures that zmap/dns interfaces and data types remain aligned with miekg/dns, guarding for inadvertent compatibility issues.

Alternatives considered:

  • Requiring zmap/dns for go-dns-root-anchors: While this approach works, it would limit the utility of the root anchors library to primarily our use case. Additionally, if we need to add another dependency that relies on miekg/dns and isn’t under our control, we’d encounter the same compatibility issue.

@developStorm developStorm self-assigned this Oct 31, 2024
@developStorm developStorm requested a review from a team as a code owner October 31, 2024 08:54
@developStorm developStorm marked this pull request as draft October 31, 2024 09:15
@developStorm
Copy link
Member Author

developStorm commented Oct 31, 2024

Pending on golang/go#70137

Workaround: zmap/dns#14

...to fix the go mod tidy issue
@developStorm developStorm marked this pull request as ready for review October 31, 2024 20:46
github.com/zmap/go-iptree v0.0.0-20210731043055-d4e632617837
github.com/zmap/zcrypto v0.0.0-20240803002437-3a861682ac77
github.com/zmap/zflags v1.4.0-beta.1.0.20200204220219-9d95409821b6
github.com/zmap/zgrab2 v0.1.8
gotest.tools/v3 v3.5.1
)

replace github.com/miekg/dns => github.com/zmap/dns v1.1.63-zdns1
Copy link
Member Author

Choose a reason for hiding this comment

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

zmap/dns v1.1.63* is miekg/dns v1.1.62. New tags are just to bypass go proxy cache system.

@zakird zakird merged commit 399faf4 into main Nov 1, 2024
3 checks passed
@zakird zakird deleted the refactor/dns-as-fork branch November 1, 2024 12:00
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.

2 participants