Allow UNIX socket for VNC websocket
PATCH 1/1 Allow UNIX socket for VNC websocket
--- ui/vnc.c | 5 ----- 1 file changed, 5 deletions(-)
ui/vnc.c +0 -5
@@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char *addrstr, addr->type =SOCKET_ADDRESS_TYPE_UNIX ; addr->u.q_unix.path =g_strdup (addrstr +5 ); -if (websocket) { -error_setg (errp,"UNIX sockets not supported with websock" ); - goto cleanup; - } -if (to) {error_setg (errp,"Port range not support with UNIX socket" ); goto cleanup;
Signature · 1 line
2.39.2
Hi
Daniel, in commit 275e0d616b ("ui: refactor code for populating SocketAddress from vnc_display_open"), you said "This refactoring also removes the restriction that prevents enabling websockets when the plain VNC server is listening on a UNIX socket.". But you didn't remove the condition. I suppose it was a left-over?
Quoted 2 lines · Sergii Zasenko
Signed-off-by Sergii Zasenko <[email protected]>
lgtm
Quoted 26 lines
--- ui/vnc.c | 5 ----- 1 file changed, 5 deletions(-)ui/vnc.c +0
-5@@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char *addrstr, addr->type =SOCKET_ADDRESS_TYPE_UNIX ; addr->u.q_unix.path =g_strdup (addrstr +5 ); -if (websocket) { -error_setg (errp,"UNIX sockets not supported with websock" ); - goto cleanup; - } -if (to) {error_setg (errp,"Port range not support with UNIX socket" );goto cleanup;--
2.39.2
Signature · 1 line
Marc-André Lureau
Quoted 7 lines · Marc-André Lureau
Hi
Daniel, in commit
275e0d616b("ui: refactor code for populating SocketAddress fromvnc_display_open"), you said "This refactoring also removes the restriction that prevents enabling websockets when the plain VNC server is listening on a UNIX socket.". But you didn't remove the condition. I suppose it was a left-over?
That commit was allowing the regular VNC port to be put on UNIX socket, at the same time as WS was enabled, it wasn't trying to put WS on a UNIX socket. Still I seee no reason to keep the limitation.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 11 lines · Sergii Zasenko
Signed-off-by Sergii Zasenko <[email protected]>--- ui/vnc.c | 5 ----- 1 file changed, 5 deletions(-)ui/vnc.c +0
-0@@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char *addrstr, addr->type =SOCKET_ADDRESS_TYPE_UNIX ;
ui/vnc.c static int vnc_display_get_address(const char *addrstr, · line 3720
Quoted 10 lines
ui/vnc.c +0
-5addr->u.q_unix.path =g_strdup (addrstr +5 ); -if (websocket) { -error_setg (errp,"UNIX sockets not supported with websock" ); - goto cleanup; - } -if (to) {error_setg (errp,"Port range not support with UNIX socket" ); goto cleanup;
Missing docs update to qemu-options.hx to describe the permitted syntax for the new feature.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
PATCH 1/1 Allow UNIX socket option for VNC websocket
- Remove unix socket option limitation for VNC websocket
- Reflect websocket option changes in documentation
--- qemu-options.hx | 4 ++++ ui/vnc.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-)
qemu-options.hx +4 -0
@@ -2451,6 +2451,10 @@ SRST host. It is possible to control the websocket listen address independently, using the syntax ``websocket``\ =host:port. + Websocket could be allowed over UNIX domain socket, using the syntax + ``websocket``\ =unix:path, where path is the location of a unix socket + to listen for connections on. + If no TLS credentials are provided, the websocket connection runs in unencrypted mode. If TLS credentials are provided, the websocket connection requires encrypted client connections.
ui/vnc.c +0 -5
@@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char *addrstr, addr->type =SOCKET_ADDRESS_TYPE_UNIX ; addr->u.q_unix.path =g_strdup (addrstr +5 ); -if (websocket) { -error_setg (errp,"UNIX sockets not supported with websock" ); - goto cleanup; - } -if (to) {error_setg (errp,"Port range not support with UNIX socket" ); goto cleanup;
Signature · 1 line
2.39.2
Re: [PATCH] Allow UNIX socket option for VNC websocket
Quoted 5 lines · Sergii Zasenko
- Remove unix socket option limitation for VNC websocket
- Reflect websocket option changes in documentationSigned-off-by Sergii Zasenko <[email protected]>
Quoted 44 lines
--- qemu-options.hx | 4 ++++ ui/vnc.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-)qemu-options.hx +1
-0@@ -2451,6 +2451,10 @@ SRST host. It is possible to control the websocket listen address independently, using the syntax ``websocket``\ =host:port. + Websocket could be allowed over UNIX domain socket, using thesyntax
+ ``websocket``\ =unix:path, where path is the location of a unix
socketqemu-options.hx +2
-0+ to listen for connections on. + If no TLS credentials are provided, the websocket connection runs in unencrypted mode. If TLS credentials are provided, the websocket connection requires encrypted client connections.ui/vnc.c +0
-5@@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char *addrstr, addr->type =SOCKET_ADDRESS_TYPE_UNIX ; addr->u.q_unix.path =g_strdup (addrstr +5 ); -if (websocket) { -error_setg (errp,"UNIX sockets not supported with websock" ); - goto cleanup; - } -if (to) {error_setg (errp,"Port range not support with UNIX socket" );goto cleanup;--
2.39.2
Signature · 1 line
Marc-André Lureau