All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Yves Ritschard <pyr@spootnik.org>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: Pierre-Yves Ritschard <pyr@spootnik.org>
Subject: [PATCH] ui/vnc.c: Allow websocket connections over AF_UNIX sockets
Date: Fri,  2 Dec 2022 16:12:04 +0100	[thread overview]
Message-ID: <20221202151202.24851-1-pyr@spootnik.org> (raw)

Hi,

The provided patch allows the VNC websocket server of a qemu process to
be provided over AF_UNIX as it is already possible for standard TCP VNC
servers.

Now that many clients support websocket connections, some exclusively,
it can be useful to expose the VNC server. One such case is when a
proxy is present on a host machine, allowing it to proxy to a
deterministic location withouth having to keep track of port mappings.

Removing the condition as is done in the provided patch creates a 
functional server. If there's a downside to this approach I could not
figure it out while reading the code. My hunch was that the condition
was there for a reason, but it did not jump at me.

Cheers,
  - pyr

---
 ui/vnc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git ui/vnc.c ui/vnc.c
index 88f55cbf3c..b01a655400 100644
--- ui/vnc.c
+++ ui/vnc.c
@@ -3729,11 +3729,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.38.1



             reply	other threads:[~2022-12-02 17:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 15:12 Pierre-Yves Ritschard [this message]
2023-01-16 18:15 ` [PATCH] ui/vnc.c: Allow websocket connections over AF_UNIX sockets Laurent Vivier
2023-01-17 12:43   ` Gerd Hoffmann
2023-01-17 12:53     ` Daniel P. Berrangé
2023-01-17 12:55       ` Laurent Vivier
2023-01-17 12:56       ` Pierre-Yves Ritschard
2023-01-17 13:01 ` Daniel P. Berrangé
2023-01-17 13:04   ` Pierre-Yves Ritschard
2023-01-17 13:13     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221202151202.24851-1-pyr@spootnik.org \
    --to=pyr@spootnik.org \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.