State machine implementation of Happy Eyeballs v3 in Rust
  • Rust 99.8%
  • Dockerfile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] c5ad303ba9
chore(deps): bump the mozilla-actions group across 1 directory with 12 updates (#162)
Bumps the mozilla-actions group with 12 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [mozilla/actions/.github/workflows/claude-review.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/mutants.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/rust](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/rustfmt.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/clippy.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/deny.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/machete.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/semver](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/mutants-pr.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/dependency-review.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/actionlint.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |
| [mozilla/actions/.github/workflows/sbom.yml](https://github.com/mozilla/actions) | `3.1.1` | `3.2.0` |



Updates `mozilla/actions/.github/workflows/claude-review.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/mutants.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/rust` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/rustfmt.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/clippy.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/deny.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/machete.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/semver` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/mutants-pr.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/dependency-review.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/actionlint.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

Updates `mozilla/actions/.github/workflows/sbom.yml` from 3.1.1 to 3.2.0
- [Release notes](https://github.com/mozilla/actions/releases)
- [Commits](42622e57e5...21f6d303fc)

---
updated-dependencies:
- dependency-name: mozilla/actions/.github/workflows/claude-review.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/mutants.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/rust
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/rustfmt.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/clippy.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/deny.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/machete.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/semver
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/mutants-pr.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/dependency-review.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/actionlint.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
- dependency-name: mozilla/actions/.github/workflows/sbom.yml
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mozilla-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-05 06:45:10 +00:00
.github chore(deps): bump the mozilla-actions group across 1 directory with 12 updates (#162) 2026-11-05 06:45:10 +00:00
.oss-scanner ci: Add oss-scanner image and threat model (#154) 2026-10-30 10:44:57 +00:00
src feat: carry the IPv6 scope id with AAAA results (#160) 2026-11-03 16:40:43 +00:00
tests feat: carry the IPv6 scope id with AAAA results (#160) 2026-11-03 16:40:43 +00:00
.clippy.toml chore: bump MSRV to 1.95 and adopt neqo's lints (#157) 2026-10-30 11:56:19 +00:00
.codecov.yml Add .codecov.yml (#60) 2026-03-26 16:21:38 +02:00
.gitignore scaffolding 2025-11-22 17:01:02 +01:00
Cargo.lock chore: prepare v2.0.0 release (#161) 2026-11-03 16:46:09 +00:00
Cargo.toml chore: prepare v2.0.0 release (#161) 2026-11-03 16:46:09 +00:00
CODE_OF_CONDUCT.md Add code of conduct 2026-02-12 14:29:43 +01:00
deny.toml chore: Use mozilla/actions for CI (#56) 2026-03-26 14:14:29 +00:00
LICENSE-APACHE license 2025-11-22 17:03:17 +01:00
LICENSE-MIT license 2025-11-22 17:03:17 +01:00
README.md Remove WORK IN PROGRESS notice from crate docs (#132) 2026-08-04 17:11:01 +02:00

Happy Eyeballs v3 Implementation

This crate provides an implementation of Happy Eyeballs v3 as specified in draft-ietf-happy-happyeyeballs-v3-02.

It is implemented as a deterministic, pure state machine. The caller drives all I/O and timers. Current time is explicitly provided by the caller. The state machine itself performs no side effects (e.g. network calls or blocking operations).

Happy Eyeballs v3 is an algorithm for improving the performance of dual-stack applications by racing IPv4 and IPv6 connections while optimizing for modern network conditions including HTTPS service discovery and QUIC.

Usage


let mut he = HappyEyeballs::new("example.com", 443).unwrap();
let now = Instant::now();

// First process outputs from the state machine, e.g. a DNS query to send:
while let Some(output) = he.process_output(now) {
    match output {
        Output::SendDnsQuery { id, hostname, record_type } => {
            // Send DNS query.
        }
        Output::AttemptConnection { id, endpoint, is_ech_retry } => {
            // Attempt connection.
        }
        _ => {}
    }
}

// Later pass results as input back to the state machine, e.g. a DNS
// response arrives:
he.process_input(Input::DnsResult { id: dns_id.unwrap(), result: dns_result }, Instant::now());

For complete example usage, see the tests/.