After a research i'm gonna try to explain the whole process i've been trough to try to solve the problem.
First, the idea was to make a WebSocket connections with the users of my app with the server to basically share some information, all this process works perfectly if we are not under SSL.
The moment my server was secured, i got two messages, first, i couldn't do a connection to a non secure WebSocket Service under SSL, obvious reasons. Then i tried the secure connection and also failed with a 400 hand shake failure.
Then i started my research about the problem, i saw that ratchet documentation didn't tell me anything new about this matter, at least not that could find. After that, i found this.
php ratchet websocket SSL connect?
I asked my provider to install and configure this Apache modules (Apache version 2.4.25, just in case that gives any valuable information). The configuration worked since now i can make the connection with the ws://www.website.com /ws/ and works fine. But now when i try wss connection, i get a timed out response:
/* Apache error
[Mon Feb 06 16:49:02.966991 2017] [cgi:error] [pid 8969] (70014)End of file found: [client ipadress:port] AH01225: Error reading request entity data [Mon Feb 06 16:51:42.530383 2017] [cgi:error] [pid 9837] (70014)End of file found: [client ipadress:port] AH01225: Error reading request entity data
*/
And the last thing, about the Stunnel configuration, im not sure what ports should i use on those variables.
https://www.stunnel.org/config_unix.html
[websockets]
accept = 8443
connect = 8888 //i guess here the port where my WS is running?
For now, with all this information and the research i did, i'm not able to find any other clue that could help me solve this.
Thanks in advance.