hyperium / hyperium/hyper

Add more control over how the connection and resolution is established

Open
#2,418 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

I need to have more control over whether the IPv4/IPv6 is used.

There are two parts to this.

Part 1: DNS

I'd like to have control over what IP protocol version is requested during the DNS resolution. This means hinting whether the A/AAAA records are requested during the resolution. The GaiResolver relies on the getaddrinfo under the hood, which has rich functionality allowing all the necessary flexibility, however, the API currently doesn't expose any of that. I know this might be due to the cross-platform compatibility needs, but I wonder what does it take to land it.

Part 2: Explicit IPv4 / IPv6 / Dual-stack sockets use in HttpConnector

The HttpConnector has a lot of logic built-in to support both IPv4 and IPv6 sockets. However, as of right now, there's no way to explicitly make it use only IPv4, IPv6 or dual-stack. Given its internal complexity, I think the best route would be implementing a custom connector. I still wanted to mention it though, because it might be valuable feedback, and would welcome it if this functionality was available in the crate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the GaiResolver and HttpConnector entry points described in the issue, including their use of getaddrinfo and the existing IPv4/IPv6 socket logic. Compare the cross-platform constraints and custom-connector option before defining the API scope. Done means the supported resolution and socket-selection behavior is explicit and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.