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

RFC - Custom DNS Resolver #2211

imiskolee opened this issue May 13, 2024 · 2 comments

RFC - Custom DNS Resolver #2211

imiskolee opened this issue May 13, 2024 · 2 comments


Copy link

imiskolee commented May 13, 2024

Request Statement

Why do we need a custom DNS resolver?

Normally, the DNS resolution provided by the operating system depends on the local operator's dns server, which makes it difficult to control the DNS caching policy and resolution stability. In this case, we can try to use DNS Over HTTP as an alternative, or we can cache DNS results locally in the app according to a customized policy. Cache DNS to sqlite/file or other ways.

Solution Brainstorm

We can add a resolver method to configure, a common design in the Golang world.

final dio = Dio({
  resolver :  (domain) -> string {
        return ""
@imiskolee imiskolee added the s: feature This issue indicates a feature request label May 13, 2024
Copy link

Creating a custom HttpClientAdapter with the resolver would be feasible. Is there any concern that this should be added to the Dio class?

Copy link

@AlexV525 thanks, I will try out now.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
@AlexV525 AlexV525 added i: not related and removed s: feature This issue indicates a feature request labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants