any1 / wayvnc

A VNC server for wlroots based Wayland compositors
ISC License
1.08k stars 68 forks source link

Reverse-VNC #99

Open 1000i100 opened 3 years ago

1000i100 commented 3 years ago

I love to find something as easy to use as Gitso, but compatible with wayland.

Does wayvnc will handle reverse-vnc connection ?

any1 commented 3 years ago

No, but if your goal is to tunnel through NAT, then you can use ssh tunneling.

lack commented 1 year ago

@1000i100 : Does SSH tunneling meet your needs?

Perhaps a FAQ.md entry and/or example script to cover this case would be useful?

bwildenhain commented 1 year ago

SSH is surely a more secure alternative, but for cases where this is not easily possible, the following would be a pure client-side possibility:

WAYVNC_SOCKET=$XDG_RUNTIME_DIR/wayvnc.socket wayvnc -u $WAYVNC_SOCKET & socat unix-connect:$WAYVNC_SOCKET tcp-connect:$MY_VNC_SERVER:5500

It simply starts wayvnc in "normal" vnc mode and makes socat connect both listening sockets initiating a reverse VNC connection. What do you think of putting this as an alternative into FAQ?

alkisg commented 11 months ago

This feature would be most welcome in this scenario:

@bwildenhain, I tried that command from raspios12 with xtighervncviewer -listen and Ubuntu 22.04 on the other side, but it didn't work for me. Later on when I Ctrl+C'ed the wayvnc process, the tigervnc on the other side said The connection was dropped by the server before the session could be established. So it sounds like there was an attempt, but it was unsuccesful. Did you manage to make that command work for you? If so what configuration did you use? Thank you!