akka/akka-http

Add support for proxying HTTPS server connections on the client side... for Web Sockets too

开放

#1,545 创建于 2017年11月22日

 (0 条评论) (0 个反应) (0 位负责人)Scala (598 个派生)batch import
1 - triagedhelp wanted

仓库指标

星标
 (1,311 个星标)
PR 合并指标
 (平均合并 1天 10小时) (30 天内合并 2 个 PR)

描述

As suggested by the title, this issue is related to #192 and its PRs #917, #921 and #1200.

We are trying to connect to an "external" server through an HTTP(S) Proxy that does not allow any "wss://..." request.

So, the singleWebSocketRequest method may be of some help as soon as its "settings" parameter handles a custom ClientTransport, as explained here, in the doc for singleRequest method...

Unfortunately, singleWebSocketRequest method takes a ClientConnectionSettings "settings" parameter, while singleRequest method takes a ConnectionPoolSettings, and there is no way to tell a ClientConnectionSettings that its ClientTransport should not always be the default ClientTransport.TCP

So we tried...

  • we made ClientConnectionSettings just look like ConnectionPoolSettings regarding its "transport" parameter
  • we made a very little change in the way singleWebSocketRequest method calls for the private _outgoingTlsConnectionLayer method in Http.scala file (through webSocketClientFlow method actually)

and it works like a charm... for us.

So, I worked on a PR I should be able to submit very soon...

The goal here is, apart from sharing a solution, to verify that "it works like a charm", but not only for us ;-)

贡献者指南