Open
Description
HTTP/2 defines a CONNECT method, where a single HTTP/2 stream is used to proxy data to/from an arbitrary TCP server.
It is described in https://datatracker.ietf.org/doc/html/rfc9113#name-the-connect-method
A rudimentary implementation is straightforward, though I don't know how compliant it is:
I tested my code against an example server described in https://nodejs.org/api/http2.html#supporting-the-connect-method
Testing this code requires updating MockWebServer, I assume.