immusen / yii2-swoole-websocket

yii2-extension for websocket base on swoole, Support JSONRPC called from websocket client or http client or redis publish to do async task or realtime connect.
Apache License 2.0
33 stars 12 forks source link

Does it support wss (SSL)? #9

Closed cangooroo88 closed 3 years ago

cangooroo88 commented 3 years ago

Sorry, couldn't find it anywhere else, does this package supports usage of SSL and do I have to setup it?

immusen commented 3 years ago

You can try to add SSL parameters into server section of config file, Such as ssl_cert_file, ssl_key_file, ssl_method..
Config example: yii2-swoole-websocket/example/websocket/config/params.php

Docs: https://wiki.swoole.com/#/server/setting?id=ssl_cert_file

More easy way to get SSL support for your project is use Nginx proxy. You can add SSL support with Nginx and make it support websocket proxy