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

httpd: allow websockets VNC connection on http port if run with -enablehttpproxy #492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxnet
Copy link
Contributor

@maxnet maxnet commented Dec 13, 2021

Upstream noVNC defaults to making the VNC websockets connection on the http port instead of port 5900 and it would be nice if that would just work.

If run with -enablehttpproxy allow http connection to be upgraded to websockets.
To test (on Debian or its derivates):

sudo apt install novnc
sudo ln -sf vnc_lite.html /usr/share/novnc/index.vnc
sudo x11vnc -httpport 80 -enablehttpproxy -httpdir /usr/share/novnc -no6 -xkb -repeat -auth guess -display WAIT:0 -forever -shared

Go with web browser to IP, and it should work without having to
patch novnc or change settings.

Upstream noVNC defaults to connecting on the http port instead
of port 5900 and it would be nice if that would just work.

- If run with -enablehttpproxy allow http connection to be
  upgraded to websockets.
- Also exports the new rfbNewWebSocketsClient() function in case
  anybody is using a custom webserver implementation in their
  application, instead of the libvncserver one, and also wants
  libvcnserver to handle the websockets connection.
  You need to feed it the http request headers that were
  already read from the socket by the webserver.

To test (on Debian or its derivates):

==
sudo apt install novnc
sudo ln -sf vnc_lite.html /usr/share/novnc/index.vnc
sudo x11vnc -httpport 80 -enablehttpproxy \
     -httpdir /usr/share/novnc -no6 -xkb -repeat -auth guess \
     -display WAIT:0 -forever -shared
==

Go with web browser to IP, and it should work without having to
patch novnc or change settings.

Signed-off-by: Floris Bos <[email protected]>
@bk138 bk138 self-assigned this Jan 23, 2022
@bk138
Copy link
Member

bk138 commented Apr 28, 2022

A lot of changes to the guts, this will need a lot of testing for regressions.

@bk138 bk138 removed their assignment Aug 5, 2023
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.

2 participants