qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/8] ui: refactor code for populating SocketAddr


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 4/8] ui: refactor code for populating SocketAddress from vnc_display_open
Date: Fri, 6 Jan 2017 09:47:25 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/05/2017 10:06 AM, Daniel P. Berrange wrote:
> The code which interprets the CLI args to populate the SocketAddress
> objects for plain & websockets VNC is quite complex already and will
> need further enhancements shortly. Refactor it into separate methods
> to avoid vnc_display_open getting even larger. As a side effect of
> the refactoring, it is now possible to specify a listen address for
> the websocket server explicitly. e.g,
> 
>   -vnc localhost:5900,websockets=0.0.0.0:8080
> 
> will listen on localhost for the plain VNC server, but expose the
> websockets VNC server on the public interface. This refactoring
> also removes the restriction that prevents enabling websockets
> when the plain VNC server is listening on a UNIX socket.
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  qemu-options.hx |  12 ++-
>  ui/vnc.c        | 282 
> ++++++++++++++++++++++++++++++++++++--------------------
>  2 files changed, 189 insertions(+), 105 deletions(-)
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index c534a2f..7470def 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1297,10 +1297,14 @@ is a TCP port number, not a display number.
>  @item websocket
>  
>  Opens an additional TCP listening port dedicated to VNC Websocket 
> connections.
> -By definition the Websocket port is address@hidden If @var{host} is
> -specified connections will only be allowed from this host.
> -As an alternative the Websocket port could be specified by using
> address@hidden@var{port}.
> +If a bare @var{websocket} option is given, the Websocket port is
> address@hidden An alternative port can be specified with the
> +syntax @address@hidden
> +
> +If @var{host} is specified connections will only be allowed from this host.
> +It is possible to control the websocket listen address independantly using

s/independantly/independently,/

> +the syntax @address@hidden:@var{port}.
> +
>  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.
> diff --git a/ui/vnc.c b/ui/vnc.c
> index b37aab4..8d3f9c1 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3519,6 +3519,178 @@ vnc_display_create_creds(bool x509,
>  }
>  
>  

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]