Open lawred2 opened 7 years ago
Found this related issue #832
Will try recommendations in that ticket..
To be sure, are you trying to do the following connection using web sockets: client --> node proxy --> third party proxy --> ws server ?
If so then debugging could be hugely difficult as you have thrown a third party in the middle. If that proxy server blocks web sockets then there is nothing that can be done here. You will need to speak to the third party.
If there is the third party proxy, are you able to provide any details on what their proxy is for or what software its using etc.
To be sure, are you trying to do the following connection using web sockets: client --> node proxy --> third party proxy --> ws server ?
Yes. That is correct.
If so then debugging could be hugely difficult as you have thrown a third party in the middle. If that proxy server blocks web sockets then there is nothing that can be done here. You will need to speak to the third party.
Agreed. This is a corporate proxy. An absolute joy killer when it comes to development. I am working with our infra team to understand what's happening here. To aid debugging I created my own MITM relay/proxy and a ws endpoint. This ws endpoint would simply echo back any messages to the connected sender. The MITM would print out the HTTP Connect request/response interaction between client and endpoint. This works perfectly and shows that the ws connect from the client can work with a proxy that supports ws connections (HTTP CONNECT).
Now working with infra to resolve proxy issues. I think until corporate proxy issues understood we can put this ticket on hold.
-Dave
Use http-proxy-agent or https-proxy-agent, see #832
Hi,
I have a requirement to connect to a ws endpoint. Between the clients and this endpoint is a proxy server. Is it possible to configure this http-proxy 'ws proxy' to issue connect requests to the ws endpoint through the proxy? The proxy supports CONNECT and will work with websockets.
I have tried creating a server as follows
I then issue ws client connect requests to http://localhost:30001 and I get ETIMEDOUTs
If I attempt to connect to a ws endpoint which is not behind a proxy server then all works perfectly
Is ws through a proxy supported? If yes, what am I doing wrong?
Regards, Dave