Skip to content

x/net/http2: ability to access raw HTTP/2 stream #34874

@JensRantil

Description

@JensRantil

I am interested in creating a HTTP proxy (note: not a reverse proxy) in Go. I'm only interested in implementing the CONNECT method. All other methods are irrelevant for me. https://github.com/elazarl/goproxy comes very close to what I want to do, but I'm also interested in supporting CONNECT when client is connected to proxy using HTTP/2. AFAIK, according to RFC7540, CONNECT over HTTP/2 should work by hijacking the stream and do TCP tunneling over it.

*http2responseWriter does not implement http.Hijacker. One idea, would be that it implements http.Hijacker which will give access not to the underlying TCP connection but rather the HTTP stream.

...or is there any other approach I could take without having to implement low-level HTTP/2 stuff?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions