Colyseus project connect via secure WebSocket

I’ve created a project with Cocos Creator 3.8.4 and Colyseus and my web build works just fine.
The problem starts when I try to launch my build in simulator or native environment. If I run my server on unsecure connection without SSL certificate it works, but when I switch to a server address with SSL certificate, native build just fails to connect and simulator gives me ‘undefined’ server error and nothing happens on the server side.
Has anyone saw solved this problem?