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

Enable happy eyeballs when using hickory-dns #2378

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

zeling
Copy link
Contributor

@zeling zeling commented Aug 11, 2024

Happy Eyeballs algorithm is implemented for hyper, however it is not working correctly for IPv6 only hosts because the default resolver option in hickory is Ipv4ThenIpv6, meaning it only sends AAAA queries if it cannot resolve an IPv4 address. Thus the address list hyper receives is almost always IPv4 only given most servers have an IPv4 address. To make the Happy Eyeballs algorithm work correctly, we need the resolver to resolve both IP versions. This also aligns with the default GAI resolver behavior for both glibc and musl.

NobodyXu added a commit to cargo-bins/cargo-binstall that referenced this pull request Aug 11, 2024
github-merge-queue bot pushed a commit to cargo-bins/cargo-binstall that referenced this pull request Aug 11, 2024
* Enable happy eyeballs when using hickory-dns

Ported from seanmonstar/reqwest#2378

Signed-off-by: Jiahao XU <[email protected]>

* Fix imports in resolver.rs

Signed-off-by: Jiahao XU <[email protected]>

* Fix fmt in resolver.rs

Signed-off-by: Jiahao XU <[email protected]>

* Fix fmt in resolver.rs

Signed-off-by: Jiahao XU <[email protected]>

* Fix resolver.rs

Signed-off-by: Jiahao XU <[email protected]>

* Fix import on windows in resolver.rs

Signed-off-by: Jiahao XU <[email protected]>

---------

Signed-off-by: Jiahao XU <[email protected]>
Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Thanks! In general, I'm fine with picking better defaults for users in this case, because anyone who needs fine-grained control can use the dns_resolver(custom_resolver)

Happy Eyeballs algorithm is implemented for hyper, however it is not
working correctly for IPv6 only hosts because the default resolver
option in hickory is `Ipv4ThenIpv6`, meaning it only sends AAAA queries
if it cannot resolve an IPv4 address. Thus the address list `hyper`
receives is almost always IPv4 only given most servers have an IPv4
address. To make the Happy Eyeballs algorithm work correctly, we need
the resolver to resolve both IP versions. This also aligns with the
default GAI resolver behavior for both glibc and musl.
@seanmonstar seanmonstar merged commit 86a18a3 into seanmonstar:master Aug 12, 2024
36 checks passed
@zeling zeling deleted the hickory_happy_eyeballs branch August 12, 2024 16:36
renovate bot added a commit to oxc-project/oxc that referenced this pull request Aug 18, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
| action | patch | `v1.10.0` -> `v1.10.2` |

---

### Release Notes

<details>
<summary>cargo-bins/cargo-binstall (cargo-bins/cargo-binstall)</summary>

###
[`v1.10.2`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.2)

[Compare
Source](https://github.com/cargo-bins/cargo-binstall/compare/v1.10.1...v1.10.2)

*Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for `cargo install` in
most cases. Install it today with `cargo install cargo-binstall`, from
the binaries below, or if you already have it, upgrade with `cargo
binstall cargo-binstall`.*

##### In this release:

- Enable happy eyeballs when using hickory-dns, ported from
[seanmonstar/reqwest#2378](https://github.com/seanmonstar/reqwest/issues/2378)
([#&#8203;1877](https://github.com/cargo-bins/cargo-binstall/issues/1877))

###
[`v1.10.1`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.1)

[Compare
Source](https://github.com/cargo-bins/cargo-binstall/compare/v1.10.0...v1.10.1)

*Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for `cargo install` in
most cases. Install it today with `cargo install cargo-binstall`, from
the binaries below, or if you already have it, upgrade with `cargo
binstall cargo-binstall`.*

##### In this release:

- Enable happy eyeballs when using hickory-dns, ported from
[seanmonstar/reqwest#2378](https://github.com/seanmonstar/reqwest/issues/2378)
([#&#8203;1877](https://github.com/cargo-bins/cargo-binstall/issues/1877))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 20, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall) | patch | `v1.10.0` -> `v1.10.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>cargo-bins/cargo-binstall (cargo-bins/cargo-binstall)</summary>

### [`v1.10.2`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.2)

[Compare Source](cargo-bins/cargo-binstall@v1.10.1...v1.10.2)

*Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.*

##### In this release:

-   Enable happy eyeballs when using hickory-dns, ported from [seanmonstar/reqwest#2378](seanmonstar/reqwest#2378) ([#&#8203;1877](cargo-bins/cargo-binstall#1877))

### [`v1.10.1`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.1)

[Compare Source](cargo-bins/cargo-binstall@v1.10.0...v1.10.1)

*Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.*

##### In this release:

-   Enable happy eyeballs when using hickory-dns, ported from [seanmonstar/reqwest#2378](seanmonstar/reqwest#2378) ([#&#8203;1877](cargo-bins/cargo-binstall#1877))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request Aug 20, 2024
Bumps reqwest from 0.12.5 to 0.12.7.

Release notes
Sourced from reqwest's releases.

v0.12.7
What's Changed

Revert adding impl Service<http::Request<_>> for Client.

Full Changelog: seanmonstar/[email protected]
v0.12.6
What's Changed

Add support for danger_accept_invalid_hostnames for rustls.
Add impl Service<http::Request<Body>> for Client and &'_ Client.
Add support for !Sync bodies in Body::wrap_stream().
Enable happy eyeballs when hickory-dns is used.
Fix Proxy so that HTTP(S)_PROXY values take precendence over ALL_PROXY.
Fix blocking::RequestBuilder::header() from unsetting sensitive on passed header values.

New Contributors

@​schopin-pro made their first contribution in seanmonstar/reqwest#2341
@​Ten0 made their first contribution in seanmonstar/reqwest#2353
@​thalesfragoso made their first contribution in seanmonstar/reqwest#2249
@​nipunn1313 made their first contribution in seanmonstar/reqwest#2361
@​Threated made their first contribution in seanmonstar/reqwest#2370
@​FlowerCode made their first contribution in seanmonstar/reqwest#2380
@​zeling made their first contribution in seanmonstar/reqwest#2378
@​murongshaozong made their first contribution in seanmonstar/reqwest#2385
@​camio made their first contribution in seanmonstar/reqwest#2388
@​alekseysidorov made their first contribution in seanmonstar/reqwest#2356

Thanks again

@​seanmonstar
@​nyurik

Full Changelog: seanmonstar/[email protected]



Changelog
Sourced from reqwest's changelog.

v0.12.7

Revert adding impl Service<http::Request<_>> for Client.

v0.12.6

Add support for danger_accept_invalid_hostnames for rustls.
Add impl Service<http::Request<Body>> for Client and &'_ Client.
Add support for !Sync bodies in Body::wrap_stream().
Enable happy eyeballs when hickory-dns is used.
Fix Proxy so that HTTP(S)_PROXY values take precendence over ALL_PROXY.
Fix blocking::RequestBuilder::header() from unsetting sensitive on passed header values.




Commits

88bd9be v0.12.7
68127f0 Revert "feat: Add impl Service\<http::Request<Body>> for Client and `&'_ C...
b2a28f5 v0.12.6
522216e feat: Add impl Service\<http::Request<Body>> for Client and &'_ Client (...
646b1f8 chore: update macOS system-configuration dep (#2368)
85dd6da dns: improve error message for hickory-dns and warn in docs (#2389)
bfd31be docs: Improve RequestBuilder::multipart's documentation (#2388)
8c7f338 chore: bump dev-dependency libflate (#2382)
dddf877 chore: bump h3 dependency
a53c944 chore: fix some comments
Additional commits viewable in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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