Skip to content

Bracket IPv6 hosts in HTTP proxy CONNECT authority - #1076

Merged
engn33r merged 1 commit into
websocket-client:1.10.0from
AryanRG:fix/ipv6-proxy-connect-authority
Oct 19, 2026
Merged

engn33r merged 1 commit into
websocket-client:1.10.0from
AryanRG:fix/ipv6-proxy-connect-authority

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

For an IPv6-literal URL such as ws://[2001:db8::1]:8080/echo, URL parsing passes the unbracketed hostname to the HTTP proxy tunnel code. It currently emits CONNECT 2001:db8::1:8080 and an equally unbracketed Host header, which a strict proxy cannot parse as host plus port. Related historical discussion: #357; this change addresses the CONNECT authority only, not every SNI/Origin concern in that issue.

Bracket colon-containing hostnames at the CONNECT serialization boundary. IPv4 and DNS destinations, proxy authentication, and the hostname passed to TLS remain unchanged. The new regression checks the complete request for IPv6, IPv4 and DNS controls at several ports.

Validation:

  • Nine IPv6 wire-request subtests failed on pristine master; all pass with this change.
  • Local proxy forwarding checks passed for IPv6 ws and certificate-verified wss, plus IPv4/DNS controls. They used only loopback sockets.
  • Local library suite with internet-dependent tests disabled: 208 passed, 16 skipped.
  • Black, package build, and distribution checks passed.
  • An additional documentation doctest did not pass because the optional rel package was missing; hosted CI and the remaining Python/platform matrix have not been verified.

AI assistance was used to investigate, implement, test, and review this change.

@engn33r
engn33r changed the base branch from master to 1.10.0 October 19, 2026 21:42
@engn33r
engn33r merged commit 0084ec3 into websocket-client:1.10.0 Oct 19, 2026
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