Skip to content

Conversation

@danielpodwysocki
Copy link

Reference the issue numbers and reviewers

Closes #203
Explain relevant issues and how this pull request solves them

The goal here is to provide a mechanism to ensure a view-only connection, per issue #203 .

Currently, this is handled on the frontend, meaning as long as the websocket is open, it is possible to send keystrokes through.

Adding another endpoint allows for clean separation and smooth integration with reverse proxies/middlewares/auth setups out there.

This helps a use case where a user has got an established setup around that or wants to integrate with their platform - so custom auth middlewares can smoothly handle routing users between RW/RO endpoints.

Describe the changes in code and its dependencies and justify that they work as intended after testing

This adds a RO DataStreamingServer on a separate port. It sets None as its input handler, meaning all inputs are skipped.

Describe alternatives you've considered

That was the only way I could figure out that prevents sending keystrokes and is not susceptible to misuse/malicious actors.

Additional context

  • [ x ] I confirm that this pull request is relevant to the scope of this project. If you know that upstream projects are the cause of this problem, please file the pull request there.
  • [ x ] I confirm that this pull request has been tested thoroughly and to the best of my knowledge that additional unintended problems do not arise.
  • [ x ] I confirm that the style of the changed code conforms to the overall style of the project.
  • [ x ] I confirm that I have read other open and closed pull requests and that duplicates do not exist.
  • [ x ] I confirm that I have justified the need for this pull request and that the changes reflect the fix for the specified problem.
  • [ x ] I confirm that no portion of this pull request contains credentials or other private information, and it is my own responsibility to protect my privacy.
  • [ x ] I confirm that the authors of this pull request does not willfully breach or infringe legal regulations, in any and all global law, regarding trademarks, trade names, logos, patents, or any and all other forms of external intellectual property, as well as adhering to software license terms of open-source and proprietary software projects.

The goal here is to provide a mechanism to ensure a view-only
connection.

Currently, this is handled on the frontend, meaning as long as the
websocket is open, it is possible to send keystrokes through.

Adding another endpoint allows for clean separation and smooth
integration with reverse proxies/middlewares/auth setups out there.

This helps a use case where a user has got an established setup around
that or wants to integrate with their platform - so custom auth
middlewares can smoothly handle routing users between RW/RO endpoints.
@ehfd ehfd requested a review from thelamer October 11, 2025 05:25
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 this pull request may close these issues.

Add a RO websocket, enforce it on the backend instead of the frontend

2 participants