Please sign in to comment.
Switch to using github.com/rancher/remotedialer for the transport
Fundamentally Inlets must perform tunneling and reverse proxying. Prior to this commit both functions in Inlets are custom implementations tied quite heavily to HTTP 1.1 request/response with no bi-directional communication. This patch replaces both tunneling and proxying with external libraries. The transport layer is switched to using github.com/rancher/remotedialer. Remote dialer allows tunneling connections at a net.Conn level so higher level protocols such as HTTP, HTTP2, WebSockets, gRPC, etc need not require specific tunneling logic only proxy logic. For proxying logic we use Kubernetes UpgradeAwareHandler which builds on top of go's built in httputil.ReverseProxy but adds support for "Connection: Upgrade" requests and HTTP response HTML rewriting. Once Inlets switches to go 1.12 it might be possible to drop the Kubernetes library and instead use the bare httputil.ReverseProxy as go 1.12 adds support for proxying WebSockets. Signed-off-by: Darren Shepherd <firstname.lastname@example.org>
- Loading branch information...
Showing with 253 additions and 387 deletions.
Oops, something went wrong.