Unable to connect to WebSocket from Javascript in settings

Good evening!
I’m trying to use the mining script below from Javascript in the settings, but I get the error message « script.js:27 WebSocket connection to ‹ wss://ws3.server:80/ › failed:
openWebSocket @script.js:27 » appears and it doesn’t work.
Is there any solution?