Happy Eyeballs With a Proxy: Which Connection Gets Raced?

ColdProxy Team9 min read

IPv4 and IPv6 paths racing to a proxy gateway before a separate destination connection

Happy Eyeballs races IPv6 and IPv4 connections. Through a proxy, gateway addresses may compete first, while reused sockets can skip a later race.

A dual-stack result can come from three places: the client-to-gateway leg, the proxy's destination lookup, or an already-open socket. Record the leg before calling one family the winner.

The same family can play a different role on each leg. Track the client, gateway, DNS owner, and destination as separate parts of the path.

Key takeaways

  • Happy Eyeballs chooses between candidate network paths for a new connection. Proxy products and exit locations are separate decisions.
  • A client using an explicit proxy normally connects to the gateway first. That may be the only IPv4-versus-IPv6 race the client performs.
  • Destination DNS can happen on the client or at the proxy, depending on the protocol and client settings.
  • A reused socket suppresses a fresh family choice on that leg. Separate IPv4 and IPv6 controls only confirm reachability at test time.

What is Happy Eyeballs?

Happy Eyeballs is a connection strategy for dual-stack systems. A client with usable IPv6 and IPv4 candidates can stagger its attempts. This avoids waiting for one family to time out before the other starts.

RFC 8305 (IETF, 2017) defines Happy Eyeballs Version 2 and obsoletes the original RFC 6555 description. It calls the method "a technique for reducing user-visible delays on dual-stack hosts." The goal is responsive connection setup when one family is unavailable or slow, while still giving IPv6 a fair opportunity.

RFC 8305 recommends a 50 ms wait when one DNS answer arrives first. It suggests 250 ms between connection attempts and requires at least 10 ms between attempt starts. Applications may use different timers.

The curl command-line documentation says curl uses the first connection that becomes established. Its default Happy Eyeballs timeout is 200 ms.

Which connection does Happy Eyeballs race?

The answer depends on the request path. A direct request has one obvious destination connection. An explicit proxy adds at least one more network leg.

Direct connection

Without a proxy, the application resolves the destination hostname, receives IPv6 and IPv4 candidates, and opens a connection to that destination. Happy Eyeballs can race those destination candidates.

The selected address family describes only the client-to-destination transport. Browsers can open several connections and reuse existing ones, so resources on one page may take different paths.

HTTP CONNECT proxy

With an HTTPS destination over an explicit HTTP proxy, the client first connects to the proxy gateway. It then sends a CONNECT request naming the target host and port. A successful CONNECT response changes that connection into a tunnel, as defined by RFC 9110.

If the gateway hostname has both address families, the client may race IPv6 and IPv4 gateway addresses. The proxy then creates or selects the upstream path to the destination. The family of the gateway socket reveals only the client leg.

This creates two different questions:

  • Client leg — did the client reach the proxy gateway over IPv4 or IPv6?
  • Upstream leg — which address family did the proxy use from its network to the destination?

The gateway and upstream legs choose families independently: IPv6 at the gateway can lead to IPv4 upstream, and vice versa.

SOCKS5 proxy

SOCKS5 makes the DNS boundary explicit in the request format. The destination address field can carry an IPv4 address, a domain name, or an IPv6 address, according to RFC 1928.

When the client sends a domain name, the proxy can resolve it. When the client resolves the hostname first and sends a literal address, the client has already made the destination-family choice.

The address type in the SOCKS5 request shows where the decision began. A domain name leaves resolution to the proxy; a literal address means the client chose before the request.

Why does connection reuse change a Happy Eyeballs result?

Happy Eyeballs matters when software needs a new connection. If a suitable socket or tunnel is already open, the application can send another request over it. No new address selection is needed on that reused leg.

The Node.js v24 network documentation describes automatic family selection as loosely implementing RFC 8305. It alternates available IPv6 and IPv4 addresses until a connection is established, subject to the application and runtime configuration.

Reuse is specific to a connection boundary:

  • Reusing the client-to-proxy socket suppresses a new gateway-family choice.
  • Reusing a CONNECT tunnel can also keep the same destination path for later traffic on that tunnel.
  • A browser can maintain several connection pools, so two tabs or origins may not share the same result.

Sticky sessions govern exit routing. Keep-alive governs an open transport connection. They can overlap, but they describe different state.

DNS changes also wait for a connection boundary to matter. A new A or AAAA answer affects later traffic after software opens or selects another connection. Tests of fresh family selection must distinguish a cold connection from a warm, reused one.

What did a direct ColdProxy control show?

On July 26, 2026 (Asia/Amman), we used Node.js v24.15.0 to send three requests to public ColdProxy pages and run two family-specific endpoint controls. The redacted record tracks new versus reused connections and reachability by IP family. Customer proxy traffic was outside its scope.

Method

The probe resolved coldproxy.com and found three A records and three AAAA records. It then used one keep-alive connection pool with a single socket, automatic family selection enabled, and an explicitly configured 250 ms attempt delay. The saved artifact contains counts only; public addresses were redacted.

Three public page requests were sent in sequence through that pool. Separately, the public IPv4 and IPv6 My IP endpoints were called as family-specific controls. Public IP values and precise location fields were redacted before the artifact was saved.

Results

The first page request established a new IPv4 socket with automatic family selection enabled and returned HTTP 200. The trace omitted Node's connection-attempt events, so the attempted candidate list is unknown. The next two page requests also returned HTTP 200 and reused that same socket.

Each endpoint control returned HTTP 200. The IPv4 endpoint identified IPv4; the IPv6 endpoint identified IPv6. Both responses included location and ASN fields; the hostname value was blank or null.

The observable state change is narrower: the first request opened a new IPv4 socket, while the later requests reused it. The two My IP endpoints showed family-specific reachability from this environment at that time. The controls ran as independent requests outside one Happy Eyeballs race.

Limits

This was one environment at one time. Global family preference, product-wide latency, and results on other browsers or networks remain outside its scope.

The public-site requests exercised a hostname that published A and AAAA records. A full proxy-path diagnosis needs authorized observations of the gateway, DNS, and exit-to-target legs separately.

Can DNS make a separate family choice?

Connection racing is only one place where address families compete. DNS traffic can also move between recursive and authoritative servers over IPv4 or IPv6.

A 2023 APNIC analysis of recursive-to-authoritative DNS behavior examined 46,447,008 distinct query-name and query-type pairs collected on one day. It found that 65% of the query sequences began over IPv4. Among the first two queries, the IPv6-then-IPv4 order appeared in 22% of sequences.

The APNIC study covers DNS resolver traffic to an authoritative service. Its scope ends before browser connections, proxy-gateway selection, or ColdProxy traffic. Dual stack can create family decisions inside DNS as well as during connection setup.

How should you read dual-stack proxy results?

Use the result pattern to identify the next question:

  • Both family controls work, while normal traffic uses one family — this can be normal. One family was selected for that connection while the other family-specific control remained reachable.
  • Only the IPv4 control works — inspect IPv6 reachability on the client, network, gateway, and destination legs before blaming Happy Eyeballs.
  • Only the IPv6 control works — inspect the equivalent IPv4 path and confirm that the client received usable A records.
  • A hostname has A and AAAA records, but one control fails — DNS publication and end-to-end reachability are different checks.
  • Repeated requests stay on one family — check whether the socket, tunnel, or connection pool was reused before interpreting the result as a fresh preference.
  • The gateway family and exit family differ — treat them as separate legs. That difference can be valid.

Record the hostname, who performed DNS, the proxy protocol, whether the connection was new or reused, the client-to-gateway family, and the exit result visible at the destination.

How should you test a dual-stack proxy path?

Start with the boundary you are trying to verify.

For the public connection, the What Is My IP tool shows the current browser and network result for each IP family. The IPv6 Checker checks whether a target hostname publishes AAAA records. The IPv6 reachability guide separates DNS, route, and endpoint checks.

For a supplied and authorized proxy, run the Proxy Checker. It evaluates IPv4 and IPv6 reachability separately, along with the visible exit IP and location. If either family is available, record partial success and investigate the failed family.

When the gateway and exit are easy to confuse, use the proxy gateway versus exit IP guide. If the unresolved question is who looked up the destination hostname, read the proxy DNS resolution guide.

Connection family is only one buying criterion. Compare current plan models and pricing on the pricing page after the technical test identifies the required family and coverage.

Frequently asked questions

Does Happy Eyeballs always prefer IPv6?

No. The algorithm gives IPv6 an opportunity without making the user wait too long for a weak path. IPv4 can still establish the selected connection. Timers, cached history, address order, network conditions, and implementation details can all change the outcome from one attempt to the next.

Does using a proxy disable Happy Eyeballs?

No. It changes where the client can apply the algorithm. Gateway addresses can become the client's first race. Destination-family selection can happen elsewhere, depending on the protocol, DNS mode, and proxy implementation. Connection reuse can also suppress a later race on an already-open leg.

Which family does HTTP CONNECT use?

CONNECT is an HTTP method. The client-to-proxy socket can use IPv4 or IPv6. After the tunnel is established, the proxy's upstream connection can independently use either family when the destination supports it. Record both legs when the gateway family differs from the exit path.

Can a reused connection change from IPv4 to IPv6?

An established transport connection keeps its address family for its lifetime. A later request can use another family only when software opens or selects a different connection. Close-versus-reuse behavior therefore matters when repeating a dual-stack test, especially when a pool keeps warm sockets available.

Why test separate IPv4 and IPv6 endpoints?

Separate endpoints act as controls. They show whether each family can reach a known service from the current environment. The requests run independently from a normal dual-stack race. This helps isolate a failed family before you inspect DNS, the gateway, or the destination path.

Conclusion

Record the gateway family, who resolved the target, the exit family, and whether the socket was new. Those fields identify which leg chose IPv4 or IPv6 and explain why a later request may behave differently.

ColdProxy Team

ColdProxy Team

Content Team

The ColdProxy Content Team consists of proxy-service experts, developers, and technical writers dedicated to providing clear, accurate insights on web scraping, online privacy, and advanced proxy technologies.