andreykaipov/goobs

wss support

Closed this issue · 2 comments

Hi

See connection inside write ws:

Can support wss: and port custome design. Thanks.

Hey thanks for the issue! So I suppose I can parametrize the scheme here:

goobs/client.go

Lines 188 to 189 in 1267b7f

func (c *Client) connect() (err error) {
u := url.URL{Scheme: "ws", Host: c.host}

However the obs-websocket server unfortunately doesn't seem to support WSS (see obsproject/obs-websocket#26).

Their solution is to put the server behind a reverse proxy like ngrok to secure it. They have a guide on their wiki: https://github.com/obsproject/obs-websocket/wiki/SSL-Tunneling.

Release v1.5.0 added a new WithScheme functional option. The default scheme is ws, but can be changed:

goobs.New("localhost:1234", goobs.WithScheme("wss"))