Open bcjat opened 4 years ago
Do you connect from a secure url https://localhost ? It won't work in that case. This plugin does not support TLS. As is, it's meant to be run into a local network between trusted devices. Unless you can PR a solution.
I setup server in one device with port 8888. Now I make connection from another device using var webClient = new WebSocket( "ws://localhost:8888");
but it gives ERR_CONNECTION_REFUSED
. So I googled about this error and found that chrome webview does not allow non secure ws://
connection to localhost it should be wss://
. What will be solution for this case.
Mixed content is not allowed. But unsecure websocket from an unsecure origin is allowed. Did you remove the origins and protocols options from the WebSocketServer config?
Yes I had removed that both options from config. Is it needed for unsecure context? If yes then what will be values for those both options?
I have googled and found that chrome webview can't open connection to WebSocket server that is unsecure. So please describe how to run WebSocketServer using secure context with TLS?