noVNC query parameter

74 views
Skip to first unread message

Sepanta

unread,
Apr 28, 2025, 1:52:01 PMApr 28
to noVNC
Hello,
The parameters entered in the URL of vnc.html, such as vnc.html?host&port&password, how are they sent to websockify? In which file can I change these parameters?

Pierre Ossman

unread,
Apr 29, 2025, 1:46:23 AMApr 29
to no...@googlegroups.com, Sepanta
websockify doesn't make use of those parameters. They are solely for noVNC.

Can you describe a bit more what it is you are trying to do?

Regards,
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Sepanta

unread,
Apr 29, 2025, 2:45:46 AMApr 29
to noVNC

Hello, thank you for your time.

I would like the password to be hidden from the user's view, because it is currently passed through the URL like this:
vnc.html?password=<password or token>
I want to encrypt the password and send it as:
vnc.html?password=<encrypted_value>
Then, I plan to decrypt it using websockify and forward it to the VNC server.
This is for connecting to the KVM console.

Best regards.

Pierre Ossman

unread,
Apr 29, 2025, 3:04:52 AMApr 29
to no...@googlegroups.com, Sepanta
On 29/04/2025 08:45, Sepanta wrote:
>
>
> Hello, thank you for your time.
>
> I would like the password to be hidden from the user's view, because it is
> currently passed through the URL like this:
> vnc.html?password=<password or token>
> I want to encrypt the password and send it as:
> vnc.html?password=<encrypted_value>
> Then, I plan to decrypt it using *websockify* and forward it to the VNC
> server.
> This is for connecting to the KVM console.
>

I'm afraid that is likely not possible. websockify is a dumb proxy and
doesn't know enough about what's being sent to modify things in transit.

I would suggest doing something like one time passwords instead.

Regards,
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc

Sepanta

unread,
Apr 29, 2025, 5:54:02 AMApr 29
to noVNC
Currently, the token is already single-use, but I want to send custom parameters to noVNC.
I've rewritten the websockify service myself, but the challenge is how to pass our custom parameters from noVNC to websockify.
I'm looking for the part of the code in noVNC where we can modify the received URL parameters and send them directly to websockify.

Pierre Ossman

unread,
May 5, 2025, 4:02:10 AMMay 5
to no...@googlegroups.com, Sepanta
On 29/04/2025 11:54, Sepanta wrote:
> Currently, the token is already single-use, but I want to send custom
> parameters to noVNC.
> I've rewritten the *websockify* service myself, but the challenge is how to
> pass our custom parameters from *noVNC* to *websockify*.
> I'm looking for the part of the code in noVNC where we can modify the
> received URL parameters and send them directly to websockify.
>

The usual way we pass stuff to websockify is via the of the WebSocket
URL. E.g. for token based server selection:

https://github.com/novnc/websockify/wiki/Token-based-target-selection
Reply all
Reply to author
Forward
0 new messages