obs-websocket-community-projects / obs-websocket-js

Consumes https://github.com/obsproject/obs-websocket
MIT License
667 stars 96 forks source link

ws:// is hardcoded at socket connect, wss:// can not be configured #204

Closed klanawagna closed 3 years ago

klanawagna commented 4 years ago

Description:

The update from the library (https://github.com/Palakis/obs-websocket) from 2 weeks ago contains a guide on how to configure secure webservices with ngrok or pagekite and suggest to provide a wss:// prefix with the connection address. The implementation of obs-websocket-js adds "ws://" hardcoded to the adress string (Socket.js Line 66) and therefor doesn't allow a secure connection.

My proposal would be to add an optional flag to the connect function that decides if ws:// or wss:// is added. I don't want to create an own fork for that as it adds functionality that is described since a few weeks in the base library and should therefor be possible in the javascript library too :-)

Versions Used (if applicable):