Answer the question
In order to leave comments, you need to log in
How to make WebSocket work through a proxy server?
There is a js script that connects to a web socket server.
It is necessary to make the server see the IP of the proxy server, not the user.
I have many IPv4 proxies of the IP:[email protected]:PASS type, you need to use them, and not just one nginx server with a config that will serve as a bridge.
That is, if you use the config
location /wss {
proxy_pass https://domain.com/chat;
proxy_set_header Origin https://www.domain.com;
proxy_set_header Host domain.com;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question