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

Project submission: Xtoys bridge #102

Open
c4llv07e opened this issue Jan 24, 2025 · 3 comments
Open

Project submission: Xtoys bridge #102

c4llv07e opened this issue Jan 24, 2025 · 3 comments

Comments

@c4llv07e
Copy link

Basic websocket bridge between xtoys custom websocket toy and buttplug.io vibrator. The most basic as it can be.

https://github.com/c4llv07e/xtoys_bridge

@c4llv07e
Copy link
Author

Upd: Now it also supports webhook protocol (when you're under NAT). Sad that I can't set Auth header in browsers websocket. Because with it I could make browser only bridge.

@qdot
Copy link
Member

qdot commented Jan 24, 2025

Upd: Now it also supports webhook protocol (when you're under NAT). Sad that I can't set Auth header in browsers websocket. Because with it I could make browser only bridge.

What do you need for the auth header? The ability to set that in the buttplug-js client?

@c4llv07e
Copy link
Author

What do you need for the auth header?

Xtoys uses Bearer authorization like this:

  const socket = new WebSocket('wss://webhook.xtoys.app/tJQTnYhIk45r', {
    headers: {
      Authorization: 'Bearer 9ee75e320c2d83eb5dc50e4b8185599e'
    }
  })

and it's not possible to do this specifically in the web browser api. I wanted to recreate this bridge in a browser page, so the only requirement for a functioning bridge would be an open site.

Still, nodejs based bridge is working, but I belive it's ideal to ask users to install nodejs for that. It's too much work for that.

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

No branches or pull requests

2 participants