Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wss support #167

Closed
sueboy19 opened this issue Jul 18, 2024 · 2 comments · Fixed by #169
Closed

wss support #167

sueboy19 opened this issue Jul 18, 2024 · 2 comments · Fixed by #169

Comments

@sueboy19
Copy link

Hi

See connection inside write ws:

Can support wss: and port custome design. Thanks.

@andreykaipov
Copy link
Owner

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.

@andreykaipov
Copy link
Owner

andreykaipov commented Aug 8, 2024

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"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants