Skip to content

HttpClient does not support cleartext HTTP/2 over http(s) proxies #99689

Closed

Description

@MihaZupan

From microsoft/aspire#1818

We support many combinations of requests and proxies, but we don't allow non-https HTTP/2 when talking through an HTTP(s) proxy.

HTTP(s) proxy SOCKS proxy
HTTP 1.1 ✅ ✅
HTTPS 1.1 ✅(CONNECT) ✅
HTTP 2 ❌ ✅
HTTPS 2 ✅(CONNECT) ✅
HTTP 1.1 WebSockets ✅(CONNECT w/o TLS) ✅
HTTPS 1.1 WebSockets ✅(CONNECT) ✅

This scenario currently gets blocked because we pick a HttpConnectionKind.Proxy pool variant here, which is limited to HTTP/1.1.

Similarly to how we use the CONNECT tunnel for non-https WebSockets, we could proxy non-HTTPS H2 that way as well (as long as the policy used isn't RequestVersionOrLower).

Activity

  1. dotnet-policy-service commented on Mar 13, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/ncl
    See info in area-owners.md if you want to be subscribed.

  2. added this to the Future milestone on Mar 28, 2024
  3. added
    enhancementProduct code improvement that does NOT require public API changes/additions
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Mar 28, 2024
  4. added a commit that references this issue on Jun 30, 2026
    9c79be6
  5. modified the milestones: Future, 11.0.0 on Jun 30, 2026
  6. added a commit that references this issue on Jul 15, 2026
    1e2d794
  7. locked and limited conversation to collaborators on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions