websockify icon indicating copy to clipboard operation
websockify copied to clipboard

Question: websockify.js to integrate support for ssh tunnel on TCP connection

Open aberbegall opened this issue 9 years ago • 5 comments

I recently forked websocky.js script and added support to connect an x11vnc server running as "x11vnc -localhost ..." that limits incoming connection to same machine only. I basically create a ssh tunnel when user to provides certain arguments (private key file path, passphrase, ssh user and a local port number).

Do you see any chance to pull this commit to the websockify.js?

Since I'm almost sure the answer will be NO, in such case how do I deal with the LGPL licence. I want to be sure that if somebody makes use of this derivative work/script LGPL conditions are still fulfilled.

Thanks

aberbegall avatar Oct 08 '17 11:10 aberbegall

Do you see any change to pull this commit to the websockify.js?

I don't have any strong opinions on the matter other than it is nice if we can keep things as simple as possible. Is there any particular reason why you don't run websockify on the VNC server machine? Then the extra ssh jump wouldn't be necessary.

Since I'm almost sure the answer will be NO, in such case how do I deal with the LGPL licence. I want to be sure that if somebody makes use of this derivative work/script LGPL conditions are still fulfilled.

You should be fine as long as you keep the license information and make sure source is available.

CendioOssman avatar Oct 09 '17 12:10 CendioOssman

Is there any particular reason why you don't run websockify on the VNC server machine? Then the extra ssh jump wouldn't be necessary.

The reason is that sometimes we want to share screen from an embedded system which cannot be manipulated or it's not covered by the manufacturer guarantee.

I agree with the idea of keep things as simple as possible so I will subscribe and keep sync with the upcoming releases of websockify repo. Thank you

aberbegall avatar Oct 09 '17 13:10 aberbegall

Ah, I see.

@kanaka, thoughts?

CendioOssman avatar Oct 10 '17 13:10 CendioOssman

Regarding the license, if you create a derivative, anybody who takes your derivative and creates and distributes a new derivative project must also still abide by the LGPL (and include the license along with code). The license requirements apply regardless of whether the derivative is on the original project or another one that is itself a derivative.

Is there any reason you couldn't create a wrapper shell script that first sets up an ssh tunnel and then invokes websockify using the local tunnel address? In addition to keeping the websockify code simple, that would have the added benefit of being able to work with any of the websockify implementations. I could get on board with including a wrapper script like that in the repo.

kanaka avatar Oct 12 '17 23:10 kanaka

Is there any reason you couldn't create a wrapper shell script that first sets up an ssh tunnel and then invokes websockify using the local tunnel address?

It's certainly possible but my idea was to be able to react to the events emitted by ssh, for example trigger the websocket client (new_client) only when ssh-tunnel emits the event 'listening', so I can avoid race conditions.

I suppose the wrapper you have in mind is a shell script but I'm targeting windows platform only.

The commit I posted before, was only my first attempt to make it work (not very proud of that code) I plan to clean up the code and separate the code that deals with the ssh tunnel so I can easily merge manually future commits from you guys.

I appreciate your help.

aberbegall avatar Oct 18 '17 17:10 aberbegall