QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
@ 2019-10-24 10:23 Samuel
  2019-10-24 17:15 ` [Bug 1849644] " Daniel Berrange
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Samuel @ 2019-10-24 10:23 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

When running a machine using "-vnc" and the "websocket" option QEMU
seems to require the subprotocol called 'binary'. This subprotocol does
not exist in the WebSocket specification. In fact it has never existed
in the spec, in one of the very early drafts of WebSockets it was
briefly mentioned but it never made it to a final version.

When the WebSocket server requires a non-standard subprotocol any
WebSocket client that works correctly won't be able to connect.

One example of such a client is noVNC, it tells the server that it
doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't let
noVNC connect. If noVNC is modified to ask for 'binary' it will work,
this is, however, incorrect behavior.

Looking at the code in "io/channel-websock.c" it seems it's quite hard-
coded to binary:

Look at line 58 and 433 here:
https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

This code has to be made more dynamic, and shouldn't require binary.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  New

Bug description:
  When running a machine using "-vnc" and the "websocket" option QEMU
  seems to require the subprotocol called 'binary'. This subprotocol
  does not exist in the WebSocket specification. In fact it has never
  existed in the spec, in one of the very early drafts of WebSockets it
  was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
  2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
@ 2019-10-24 17:15 ` " Daniel Berrange
  2019-10-28 12:36 ` Samuel
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel Berrange @ 2019-10-24 17:15 UTC (permalink / raw)
  To: qemu-devel

It isn't mandatory to use a standardized subprotocol, all that's
required is that the client & server agree

  https://developer.mozilla.org/en-
US/docs/Web/HTTP/Protocol_upgrade_mechanism

  "The subprotocols may be selected from the IANA WebSocket Subprotocol
Name Registry or may be a custom name jointly understood by the client
and the server."

QEMU used/required 'binary' because that is what noVNC used when the
QEMU websockets code was first implemented.

It appears that noVNC was changed though to not send a "binary"
subprotocol in

  commit f8318361b1b62c4d76b091132d4a8ccfdd2957e4
  Author: Pierre Ossman <ossman@cendio.se>
  Date:   Sat Oct 14 12:45:56 2017 +0200

    Remove wsProtocols setting
    
    It isn't in use anymore since we deprecated support for Base64 mode.

>From QEMU's POV looks like we'll need to tweak code to treat 'binary'
and no sub-protocol as being equivalent.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  New

Bug description:
  When running a machine using "-vnc" and the "websocket" option QEMU
  seems to require the subprotocol called 'binary'. This subprotocol
  does not exist in the WebSocket specification. In fact it has never
  existed in the spec, in one of the very early drafts of WebSockets it
  was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
  2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
  2019-10-24 17:15 ` [Bug 1849644] " Daniel Berrange
@ 2019-10-28 12:36 ` Samuel
  2019-11-23  3:48 ` yuchenlin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Samuel @ 2019-10-28 12:36 UTC (permalink / raw)
  To: qemu-devel

Thank you for your response, Daniel!

Do you think this is something you will have the opportunity to look at
soon?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  New

Bug description:
  When running a machine using "-vnc" and the "websocket" option QEMU
  seems to require the subprotocol called 'binary'. This subprotocol
  does not exist in the WebSocket specification. In fact it has never
  existed in the spec, in one of the very early drafts of WebSockets it
  was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
  2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
  2019-10-24 17:15 ` [Bug 1849644] " Daniel Berrange
  2019-10-28 12:36 ` Samuel
@ 2019-11-23  3:48 ` yuchenlin
  2020-01-02 10:41 ` Samuel
  2020-01-15  1:43 ` yuchenlin
  4 siblings, 0 replies; 6+ messages in thread
From: yuchenlin @ 2019-11-23  3:48 UTC (permalink / raw)
  To: qemu-devel

I have sent a patch about this problem.

Please see https://lists.nongnu.org/archive/html/qemu-
devel/2019-11/msg03924.html

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  New

Bug description:
  When running a machine using "-vnc" and the "websocket" option QEMU
  seems to require the subprotocol called 'binary'. This subprotocol
  does not exist in the WebSocket specification. In fact it has never
  existed in the spec, in one of the very early drafts of WebSockets it
  was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
  2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
                   ` (2 preceding siblings ...)
  2019-11-23  3:48 ` yuchenlin
@ 2020-01-02 10:41 ` Samuel
  2020-01-15  1:43 ` yuchenlin
  4 siblings, 0 replies; 6+ messages in thread
From: Samuel @ 2020-01-02 10:41 UTC (permalink / raw)
  To: qemu-devel

Did anyone at QEMU get a chance to look at that patch?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  New

Bug description:
  When running a machine using "-vnc" and the "websocket" option QEMU
  seems to require the subprotocol called 'binary'. This subprotocol
  does not exist in the WebSocket specification. In fact it has never
  existed in the spec, in one of the very early drafts of WebSockets it
  was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
  2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
                   ` (3 preceding siblings ...)
  2020-01-02 10:41 ` Samuel
@ 2020-01-15  1:43 ` yuchenlin
  4 siblings, 0 replies; 6+ messages in thread
From: yuchenlin @ 2020-01-15  1:43 UTC (permalink / raw)
  To: qemu-devel

Hi, Samuel

This patch has been viewed by Daniel.
Please see https://lists.nongnu.org/archive/html/qemu-devel/2019-12/msg00264.html

However, Daniel has not sent a PR which includes this patch.

Thanks.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  New

Bug description:
  When running a machine using "-vnc" and the "websocket" option QEMU
  seems to require the subprotocol called 'binary'. This subprotocol
  does not exist in the WebSocket specification. In fact it has never
  existed in the spec, in one of the very early drafts of WebSockets it
  was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
2019-10-24 17:15 ` [Bug 1849644] " Daniel Berrange
2019-10-28 12:36 ` Samuel
2019-11-23  3:48 ` yuchenlin
2020-01-02 10:41 ` Samuel
2020-01-15  1:43 ` yuchenlin

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git