Good day. Please tell me the solution that will allow me to implement secure communication (wss) between the server and the client on the websockets. I use openfl-websocket to connect. Insecure connection (ws) to implement was not so difficult. But if the client is in the https zone, then there are difficulties connecting to the server. The fact is that I have a server located on vps hosting. The server is written in Java. Apache on vps is not used, there is only a running program in the form of a server. When I try to connect, I just get a timeout
WebSocket connection to ‘wss: // ip: port /’ failed: WebSocket opening handshake timed out. If you change to ws + go to the link on http, then everything works, but you need https. Tell me what should I do to make it work?
- What do I need to do on the client side? Do I just need to change to wss instead of ws and connect.
- What do I need to do on Linux vps hosting?
I would appreciate any advice and examples.