PHPWebSocket-Chat icon indicating copy to clipboard operation
PHPWebSocket-Chat copied to clipboard

wss support

Open sipy opened this issue 10 years ago • 10 comments

Hi, congratulations for the the personal implementation of the WebSocket server. I'm going to use your library for a personal open source project. I have one very important request. Is it possible to add the "wss" (WebSockets over SSL/TLS) protocol support inside the php class library (I need it for my project)?

Thank you.

sipy avatar Mar 27 '14 00:03 sipy

I also would like to know this, please

daslicht avatar Sep 03 '14 01:09 daslicht

And me too.
how to use "wss" ?

evgencode avatar Aug 30 '16 08:08 evgencode

How i can use wss? If anyone got answer. Please let me know

Usman-Asghar avatar Oct 20 '16 22:10 Usman-Asghar

You get a certificate just like https or perhaps even the same one using letsEncript or paid services, link that to your web server and all should work.

adminy avatar Oct 14 '17 13:10 adminy

Hello I have an nginx web server and I have installed SSL from Unizeto technology S.A, but when it is connected, all IPs are returned to my IP server. Is there a problem with config nginx? or Is there a problem with the source code? please help me

twelvew12 avatar Feb 01 '19 08:02 twelvew12

@twelvew12 normally wss shares https’s certificates to be secure, If your https server is working so will ssl! What IP server are you talking about? Can you be more specific in the steps you are doing?

SSL certificates is a web server configuration problem if you’re using nginx, it’d be a different story if it was node.js where your web server is in the code not separate like nginx.

adminy avatar Feb 01 '19 08:02 adminy

Thank you very much for your answer I mean the same server IP virtual server IP. Also, I used a php socket, not node,js

How to configure ssl to set wss?

twelvew12 avatar Feb 01 '19 09:02 twelvew12

In Nginx You can use a proxy to place everything through ssl, have a look at: https://github.com/nicokaiser/nginx-websocket-proxy/blob/master/simple-wss.conf

But if you’re asking how you can set up ssl on the server, normally a public body Unizetl technology S.A just verifies through a program Your server from the outside while giving you 2 files, private and public key. You use those in the configuration I linked above.

adminy avatar Feb 01 '19 10:02 adminy

Thanks I have a DirectAdmin and I do ssl settings automatically. Also, the link that you sent is in accordance with my socket settings. But I do not know why class.PHPWebSocket.php returns all ip's to the virtual server's IP.

I installed this program correctly on nginx before I installed ssl. What should I do?

twelvew12 avatar Feb 01 '19 11:02 twelvew12

Hello good time If you can solve it somehow. Behold : We have these things: nginx ssl firewall

Which of these items is messing up. When we did not have ssl, websocket would return the correct IPs, but now it will return the ip server?

twelvew12 avatar Feb 02 '19 05:02 twelvew12