Skip to content

http3: client always prefers IPv4 #3755

Description

@kgersen

Because of a bug of ResolveUDPAddr, when trying to connect to a dual stacked host (= host with both ipv6 and ipv4 addresses), quic-go client always uses IPv4 instead of prefering IPv6 if available.
net/http (both versions 1.x and 2.0) doesn't behave like that. It prefers IPv6 if available.

As a workaround we're forced to explicitly resolve names before using quic-go http3 client.

demo of the issue: https://github.com/kgersen/h3dial
running on a dual stack machine:

QUIC-GO:
  connected to 172.67.9.235:443
  got status:  200 OK
  proto:  HTTP/3.0
net/http:
  connected to  [2606:4700:10::6816:926]:443
  got status:  200 OK
  proto:  HTTP/2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions