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

feat: Add custom dns resolver #54

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

mohitsethia
Copy link
Contributor

@mohitsethia mohitsethia commented Jul 13, 2024

Adding the support of the custom DNS Resolver, reads with -r flag & would use the default one if not provided.
issue [link]

@mohitsethia mohitsethia mentioned this pull request Jul 13, 2024
ID: "http",
RHost: RandomCaptivePortal,
}
httpProtocol.Probe = func(domain string, timeout time.Duration) (string, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kept it consistent for all Probes as a receiver method to Protocol.

@hugoh
Copy link

hugoh commented Jul 29, 2024

@mohitsethia - thanks for implementing this.

The current implementation of the DNS probe seemed a bit backward to me: it resolves a name using the local DNS server. While it may be a good indication if whether the local computer's connection is up, it's not necessarily a great indicator of whether the internet connection is for a site as the response may be cached. It would be more interesting to resolve a host with an external DNS server, which you've implemented.

I make use of up in a tool of mine and have bumped into this issue: see hugoh/upd#26.

@jesusprubio jesusprubio merged commit 784898b into jesusprubio:main Oct 4, 2024
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.

3 participants