novnc / noVNC

VNC client web application
https://novnc.com
Other
11.73k stars 2.32k forks source link

Add support for VMWare extensions to RFB/VNC #44

Open kanaka opened 13 years ago

kanaka commented 13 years ago

VMWare implements some extensions to the protocol that would be interesting to support in noVNC. I'm unlikely to personally get around to this (and don't have access to a ESX server) but somebody might be interested in doing this.

Some relevant links:

http://mail.gnome.org/archives/gtk-vnc-list/2008-January/msg00005.html http://wiki.multimedia.cx/index.php?title=VMware_Video http://bluebear.org/projects/kodiak/repository/revisions/master/entry/src/com/bluebear/rfb/vnc.h

CendioOssman commented 6 years ago

The extensions are now documented in the rfbproto project:

https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst

tybin commented 1 year ago

What is the current status of this? I see the issue opened, and a linked issue #70 reported working noVNC + ESXi setup, but experimenting on my own I couldn't figure this out.

I've tested both vCenter proxy and direct connection to ESXi (VMWare 6.7), both seem to expose non-RFB compliant endpoints, with different starting messages and messaging schemes. VMWare HTML Console SDK also requests an undocumented vmware-vvc subprotocol, and not negotiating it doesn't downgrade the connection to RFB. Am I missing a pure-RFB/VNC endpoint?

tybin commented 1 year ago

Acutally there is a pure RFB endpoint, docs say its on VMWare 6.0 and up:

Mouse-keyboard-screen over WebSocket ticket. MKS protocol is VNC (a.k.a. RFB) protocol with VMware extensions; the protocol gracefully degrades to standard VNC if extensions are not available. wss://{Ticket.host}/ticket/{Ticket.ticket}

I've just tested it and it seems to work fine, so I guess noVNC does support VMWare, just not the extensions. The ticket type and request path controls whether the host exposes custom VMWare traffic or regular RFB.

Lantizia commented 3 months ago

so I guess noVNC does support VMW

Have you tested this works, or just presumed it would based off what you've read?

I've got a whole bunch of ESXi hosts here (managed by a vCenter) on the latest ESXi 8.x... but since VMware dropped the ability to connect with regular VNC (ever since ESXi 7.x was released) it means WebMKS is the only choice.

However WebMKS seems to just be VNC tunneled via a WebSocket (much like websockify does), so first of all I thought I'd try it the way VMware documents it for developers...

The VMware way (scroll down for trying this with noVNC)

The noVNC way

I tried this... file:///home/user/Downloads/noVNC-1.5.0/vnc.html?autoconnect=1&host=an-esxi-host.example.lan&port=443&path=/ticket/5ba3d919a399a648937efb33747e47e8

And all I get is this... Peek 2024-08-06 10-43

So I'm wondering how reasonable it was to have expected this to just work?

It's VNC within a WebSocket sure! But I guess it all depends on if an ESXi host "websockifies" things, the same way that websockify does!?

tybin commented 2 months ago

@Lantizia it is way out of scope of this issue, but it is a common practice I found when working with hypervisors in general to issue one-time tickets after authenticating. You'll need some backend to request the ticket in a safe manner for sure. A stolen ticket is worth nothing to the attacker that wants to assume control over the environment, the VM access notwithstanding.

The noVNC client library works with VMWare 6/7, I haven't tested 8 as I don't have access to one. The only quirk is encoding artifacts shown as discolouring, but it is present even in VMWare GUI for console access, so I assume this has something to do with their implementation and not noVNC.