Description
I'd like this http-add-on
Interceptor Proxy to also support WebSocket connections.
Use-Case
Currently WebSocket connections are not supported through the Interceptor proxy. Per this discussion, HTTP requests with upgrade
headers receive HTTP 403
responses: #618
I hope we can add logic to the Interceptor proxy to identify HTTP requests with these WebSocket headers and hand them off to a different HTTP handler.
Specification
I found an MIT-licensed library that produces an http.Handler
object capable of proxying WebSocket connections. https://github.com/koding/websocketproxy/blob/master/websocketproxy.go
I imagine that when an incoming HTTP request tries to upgrade to a WebSocket connection, the Interceptor's existing Handler
can hand it off to another Handler
created using this library, which can support a proxied WebSocket connection.
While I'm familiar with the relevant networking protocols, I'm not very familiar with golang and its net.http
library. Could this work? Can Handler
objects be "chained"? Is this the right integration point?
Alternatively, could we add some pieces of that library to the existing proxy handler to support WebSockets?
Metadata
Metadata
Assignees
Type
Projects
Status