websockify beginner question

221 views
Skip to first unread message

Chandan Jha

unread,
Apr 28, 2023, 2:54:32 PM4/28/23
to noVNC
i have a vnc server running at 

ws://localhost:4444/vnc/1185294e991b9a1d7b129c19825fe6f7?password=selenoid           

i want to convert this websocket into tcp/ip so that i can use python library like vncdotool to communicate with above websocket so that i can send the keyevents and mouseevents in background without opening the vnc client gui. how can i achieve this tried something like below but its not working:

websockify 8080 localhost:4444 --target-cfg /vnc/1185294e991b9a1d7b129c19825fe6f7,password=selenoid

Pierre Ossman

unread,
May 2, 2023, 8:56:54 AM5/2/23
to no...@googlegroups.com, Chandan Jha
websockify is for the other way around, for WebSocket clients to connect
to regular TCP/IP services.

If your VNC server only allows WebSocket connections, then I'm afraid
you'll have to add WebSocket support to your client. I'm not aware of
any proxy for that purpose.

For Python code you can use the WebSocket class from the websockify
project as it also has code to act like a client:

https://github.com/novnc/websockify/blob/master/websockify/websocket.py

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://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?

Reply all
Reply to author
Forward
0 new messages