any1 / neatvnc

A liberally licensed VNC server library with a clean interface
ISC License
119 stars 29 forks source link

Unix Socket #1

Closed any1 closed 3 years ago

any1 commented 4 years ago

On multi user systems, any user can connect to localhost. To be able to run a VNC server safely on a multi user system with SSH tunneling it needs to be possible to create a unix socket instead of a TCP socket.

r-c-f commented 3 years ago

What would the preferred method be to indicate to nvnc_open() that the address is actually a path for a unix socket?

any1 commented 3 years ago

I think I'd prefer things to be explicit, so there should be a new API function called nvnc_open_unix().

r-c-f commented 3 years ago

Shortly after asking I realized that one of my systems running FreeBSD already supports UNIX sockets through getaddrinfo, so I went with extending that instead to minimize changes to other parts of the code. Though I can certainly separate it out if that is preferred.

any1 commented 3 years ago

Yeah, I think it's probably best to keep them separate. I can't think of a concrete reason for doing it one way or the other, but I like to err on the side of explicitness.