swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.04k stars 390 forks source link

How to set SSL for websocket connection? #496

Open majidfarzaneh opened 3 years ago

majidfarzaneh commented 3 years ago

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole) PHP 7.4.16 Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.6.7 Built => May 17 2021 11:39:45 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.1.1c FIPS 28 May 2019 dtls => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.2.11 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled mysqlnd => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608

  1. Please provide your Laravel/Lumen version. laravel/lumen-framework: 7.0

  2. Which release version of this package are you using? swooletw/laravel-swoole: 2.8

  3. What did you do? If possible, provide a recipe for reproducing the error. for websocket connection i'm using ws://example.com:8000 and it work but web i'm using wss instead of ws i have error.

  4. What did you expect to see? socket connected

  5. What did you see instead? this error: Error: write EPROTO 1782654440:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242: