If a client sends a web socket request to the bridge server and that web socket request is over http, the websocket request gets sent to the https proxy server. This results in http websockets not working. The fix to this is nontrivial since the client only sends an http CONNECT request to the proxy. A quick and dirty solution involves reading the port number of the connect request. If the port number is 443 then redirect to the TLS server. If the port number is 80, proxy as usual. However, these assumptions break URL's where the port is specified so a more robust solution might be to do protocol sniffing to determine if the request is a HTTP connection or a TLS connection.
Might also be of merit to investigate if the host header has this port information.
If a client sends a web socket request to the bridge server and that web socket request is over http, the websocket request gets sent to the https proxy server. This results in http websockets not working. The fix to this is nontrivial since the client only sends an http CONNECT request to the proxy. A quick and dirty solution involves reading the port number of the connect request. If the port number is 443 then redirect to the TLS server. If the port number is 80, proxy as usual. However, these assumptions break URL's where the port is specified so a more robust solution might be to do protocol sniffing to determine if the request is a HTTP connection or a TLS connection.
Might also be of merit to investigate if the host header has this port information.