V
V
vipvipvipvipvipvipvipvip2019-03-05 07:53:17
Nginx
vipvipvipvipvipvipvipvip, 2019-03-05 07:53:17

Proxy with Nginx Websocket wss to ws?

The problem is as follows:
Data is transmitted from the client to the server using the ws protocol (new WebSocket("ws://domen.ru:1111). Everything works fine.
The client switched to the wss protocol (new WebSocket("wss://domen.ru :1111), as I understand it, everything comes in encrypted form. Then the server cannot understand what is happening. Is it
possible to use Nginx to proxy wss to ws with traffic decryption and give it to the server?
...
location / wss {
proxy_pass http://domen .ru:1111;
...
Or do I misunderstand the mechanism of proxying and decryption should be done on the server side?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Shatokhin, 2019-03-05
@vipvipvipvipvipvipvipvip

Of course you can. Only on the server. Install nginx and further according to the documentation
And as a tip - keep ws and wss on different ports. There will be less confusion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question