Преглед изворни кода

Allow UNIX socket option for VNC websocket

- Remove unix socket option limitation for VNC websocket
- Reflect websocket option changes in documentation

Signed-off-by: Sergii Zasenko <sergii@zasenko.name>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230724100353.16628-1-sergii@zasenko.name>
Sergii Zasenko пре 2 година
родитељ
комит
41582637b1
2 измењених фајлова са 4 додато и 5 уклоњено
  1. 4 0
      qemu-options.hx
  2. 0 5
      ui/vnc.c

+ 4 - 0
qemu-options.hx

@@ -2516,6 +2516,10 @@ SRST
         host. It is possible to control the websocket listen address
         host. It is possible to control the websocket listen address
         independently, using the syntax ``websocket``\ =host:port.
         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
         If no TLS credentials are provided, the websocket connection
         runs in unencrypted mode. If TLS credentials are provided, the
         runs in unencrypted mode. If TLS credentials are provided, the
         websocket connection requires encrypted client connections.
         websocket connection requires encrypted client connections.

+ 0 - 5
ui/vnc.c

@@ -3734,11 +3734,6 @@ static int vnc_display_get_address(const char *addrstr,
         addr->type = SOCKET_ADDRESS_TYPE_UNIX;
         addr->type = SOCKET_ADDRESS_TYPE_UNIX;
         addr->u.q_unix.path = g_strdup(addrstr + 5);
         addr->u.q_unix.path = g_strdup(addrstr + 5);
 
 
-        if (websocket) {
-            error_setg(errp, "UNIX sockets not supported with websock");
-            goto cleanup;
-        }
-
         if (to) {
         if (to) {
             error_setg(errp, "Port range not support with UNIX socket");
             error_setg(errp, "Port range not support with UNIX socket");
             goto cleanup;
             goto cleanup;