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(ext/fetch): Allow specifying a custom DNS resolver for fetch calls #17166

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SkaillZ
Copy link

@SkaillZ SkaillZ commented Dec 22, 2022

Implements #17165

  • Adds a new field to deno_fetch::Options to allow specifying a custom DNS resolver
  • Bumps reqwest to the latest version to use this feature

@CLAassistant
Copy link

CLAassistant commented Dec 22, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

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

Hello and thank you for the contribution.

Before this can be merged, it will at least need a test showing how this can be used from Deno, and of course testing that it works. Currently I can only see Rust side implementations for supporting this feature but not how it can be used.

A further issue is of course that if this is adding custom Deno options to the Fetch API's options bag (eg. fetch(url, { dnsResolver }) then that may require some WinterCG-level discussions.

@SkaillZ SkaillZ force-pushed the custom-dns-resolver-upstream branch from f65cf6c to edddffd Compare March 27, 2023 13:36
@SkaillZ SkaillZ force-pushed the custom-dns-resolver-upstream branch from edddffd to c7af103 Compare March 27, 2023 13:47
@SkaillZ
Copy link
Author

SkaillZ commented Mar 27, 2023

@aapoalas I think there's a misunderstanding here, I didn't mean to expose an option to customize the DNS resolver via JavaScript. It's meant to instead give custom runtimes more control over DNS resolution on the Rust side (similarly to how FetchPermissions is used).

Regarding tests, I couldn't find any in fetch.rs, so I'm not sure where the best place for tests concerning ext/fetch would be. I'd be happy to write some tests if you could point me to the right place to add them to.

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.

4 participants