pub struct VNCBuilder<S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<S: State> VNCBuilder<S>
impl<S: State> VNCBuilder<S>
Sourcepub fn display(self, value: VNCDisplay) -> VNCBuilder<SetDisplay<S>>where
S::Display: IsUnset,
pub fn display(self, value: VNCDisplay) -> VNCBuilder<SetDisplay<S>>where
S::Display: IsUnset,
Required.
Sourcepub fn reverse(self, value: OnOff) -> VNCBuilder<SetReverse<S>>where
S::Reverse: IsUnset,
pub fn reverse(self, value: OnOff) -> VNCBuilder<SetReverse<S>>where
S::Reverse: IsUnset,
Sourcepub fn maybe_reverse(self, value: Option<OnOff>) -> VNCBuilder<SetReverse<S>>where
S::Reverse: IsUnset,
pub fn maybe_reverse(self, value: Option<OnOff>) -> VNCBuilder<SetReverse<S>>where
S::Reverse: IsUnset,
Sourcepub fn websocket(self, value: OnOff) -> VNCBuilder<SetWebsocket<S>>where
S::Websocket: IsUnset,
pub fn websocket(self, value: OnOff) -> VNCBuilder<SetWebsocket<S>>where
S::Websocket: IsUnset,
Optional (Some / Option setters).
Opens an additional TCP listening port dedicated to VNC
Websocket connections. If a bare websocket option is given, the
Websocket port is 5700+display. An alternative port can be
specified with the syntax websocket
\ =port.
If host is specified connections will only be allowed from this
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.
Sourcepub fn maybe_websocket(
self,
value: Option<OnOff>,
) -> VNCBuilder<SetWebsocket<S>>where
S::Websocket: IsUnset,
pub fn maybe_websocket(
self,
value: Option<OnOff>,
) -> VNCBuilder<SetWebsocket<S>>where
S::Websocket: IsUnset,
Optional (Some / Option setters).
Opens an additional TCP listening port dedicated to VNC
Websocket connections. If a bare websocket option is given, the
Websocket port is 5700+display. An alternative port can be
specified with the syntax websocket
\ =port.
If host is specified connections will only be allowed from this
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.
Sourcepub fn password(self, value: OnOff) -> VNCBuilder<SetPassword<S>>where
S::Password: IsUnset,
pub fn password(self, value: OnOff) -> VNCBuilder<SetPassword<S>>where
S::Password: IsUnset,
Optional (Some / Option setters).
Require that password based authentication is used for client connections.
The password must be set separately using the set_password
command in the :ref:QEMU monitor
. The
syntax to change your password is:
set_password <protocol> <password>
where
If you would like to change expire_password <protocol> <expiration-time>
where expiration time could be one of the following options:
now, never, +seconds or UNIX time of expiration, e.g. +60 to
make password expire in 60 seconds, or 1335196800 to make
password expire on “Mon Apr 23 12:00:00 EDT 2012” (UNIX time for
this date and time).
You can also use keywords “now” or “never” for the expiration
time to allow
Sourcepub fn maybe_password(self, value: Option<OnOff>) -> VNCBuilder<SetPassword<S>>where
S::Password: IsUnset,
pub fn maybe_password(self, value: Option<OnOff>) -> VNCBuilder<SetPassword<S>>where
S::Password: IsUnset,
Optional (Some / Option setters).
Require that password based authentication is used for client connections.
The password must be set separately using the set_password
command in the :ref:QEMU monitor
. The
syntax to change your password is:
set_password <protocol> <password>
where
If you would like to change expire_password <protocol> <expiration-time>
where expiration time could be one of the following options:
now, never, +seconds or UNIX time of expiration, e.g. +60 to
make password expire in 60 seconds, or 1335196800 to make
password expire on “Mon Apr 23 12:00:00 EDT 2012” (UNIX time for
this date and time).
You can also use keywords “now” or “never” for the expiration
time to allow
Sourcepub fn password_secret(self, value: String) -> VNCBuilder<SetPasswordSecret<S>>where
S::PasswordSecret: IsUnset,
pub fn password_secret(self, value: String) -> VNCBuilder<SetPasswordSecret<S>>where
S::PasswordSecret: IsUnset,
Sourcepub fn maybe_password_secret(
self,
value: Option<String>,
) -> VNCBuilder<SetPasswordSecret<S>>where
S::PasswordSecret: IsUnset,
pub fn maybe_password_secret(
self,
value: Option<String>,
) -> VNCBuilder<SetPasswordSecret<S>>where
S::PasswordSecret: IsUnset,
Sourcepub fn tls_creds(self, value: String) -> VNCBuilder<SetTlsCreds<S>>where
S::TlsCreds: IsUnset,
pub fn tls_creds(self, value: String) -> VNCBuilder<SetTlsCreds<S>>where
S::TlsCreds: IsUnset,
Optional (Some / Option setters).
Provides the ID of a set of TLS credentials to use to secure the
VNC server. They will apply to both the normal VNC server socket
and the websocket socket (if enabled). Setting TLS credentials
will cause the VNC server socket to enable the VeNCrypt auth
mechanism. The credentials should have been previously created
using the -object tls-creds
argument.
Sourcepub fn maybe_tls_creds(
self,
value: Option<String>,
) -> VNCBuilder<SetTlsCreds<S>>where
S::TlsCreds: IsUnset,
pub fn maybe_tls_creds(
self,
value: Option<String>,
) -> VNCBuilder<SetTlsCreds<S>>where
S::TlsCreds: IsUnset,
Optional (Some / Option setters).
Provides the ID of a set of TLS credentials to use to secure the
VNC server. They will apply to both the normal VNC server socket
and the websocket socket (if enabled). Setting TLS credentials
will cause the VNC server socket to enable the VeNCrypt auth
mechanism. The credentials should have been previously created
using the -object tls-creds
argument.
Sourcepub fn tls_authz(self, value: String) -> VNCBuilder<SetTlsAuthz<S>>where
S::TlsAuthz: IsUnset,
pub fn tls_authz(self, value: String) -> VNCBuilder<SetTlsAuthz<S>>where
S::TlsAuthz: IsUnset,
Optional (Some / Option setters).
Provides the ID of the QAuthZ authorization object against which the client’s x509 distinguished name will validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the VNC server is active. If missing, it will default to denying access.
Sourcepub fn maybe_tls_authz(
self,
value: Option<String>,
) -> VNCBuilder<SetTlsAuthz<S>>where
S::TlsAuthz: IsUnset,
pub fn maybe_tls_authz(
self,
value: Option<String>,
) -> VNCBuilder<SetTlsAuthz<S>>where
S::TlsAuthz: IsUnset,
Optional (Some / Option setters).
Provides the ID of the QAuthZ authorization object against which the client’s x509 distinguished name will validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the VNC server is active. If missing, it will default to denying access.
Sourcepub fn sasl(self, value: OnOff) -> VNCBuilder<SetSasl<S>>where
S::Sasl: IsUnset,
pub fn sasl(self, value: OnOff) -> VNCBuilder<SetSasl<S>>where
S::Sasl: IsUnset,
Optional (Some / Option setters).
Require that the client use SASL to authenticate with the VNC
server. The exact choice of authentication method used is
controlled from the system / user’s SASL configuration file for
the ‘qemu’ service. This is typically found in
/etc/sasl2/qemu.conf. If running QEMU as an unprivileged user,
an environment variable SASL_CONF_PATH can be used to make it
search alternate locations for the service config. While some
SASL auth methods can also provide data encryption (eg GSSAPI),
it is recommended that SASL always be combined with the ‘tls’
and ‘x509’ settings to enable use of SSL and server
certificates. This ensures a data encryption preventing
compromise of authentication credentials. See the
:ref:VNC security
section in the System Emulation Users Guide
for details on using SASL authentication.
Sourcepub fn maybe_sasl(self, value: Option<OnOff>) -> VNCBuilder<SetSasl<S>>where
S::Sasl: IsUnset,
pub fn maybe_sasl(self, value: Option<OnOff>) -> VNCBuilder<SetSasl<S>>where
S::Sasl: IsUnset,
Optional (Some / Option setters).
Require that the client use SASL to authenticate with the VNC
server. The exact choice of authentication method used is
controlled from the system / user’s SASL configuration file for
the ‘qemu’ service. This is typically found in
/etc/sasl2/qemu.conf. If running QEMU as an unprivileged user,
an environment variable SASL_CONF_PATH can be used to make it
search alternate locations for the service config. While some
SASL auth methods can also provide data encryption (eg GSSAPI),
it is recommended that SASL always be combined with the ‘tls’
and ‘x509’ settings to enable use of SSL and server
certificates. This ensures a data encryption preventing
compromise of authentication credentials. See the
:ref:VNC security
section in the System Emulation Users Guide
for details on using SASL authentication.
Sourcepub fn sasl_authz(self, value: String) -> VNCBuilder<SetSaslAuthz<S>>where
S::SaslAuthz: IsUnset,
pub fn sasl_authz(self, value: String) -> VNCBuilder<SetSaslAuthz<S>>where
S::SaslAuthz: IsUnset,
Optional (Some / Option setters).
Provides the ID of the QAuthZ authorization object against which the client’s SASL username will validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the VNC server is active. If missing, it will default to denying access.
Sourcepub fn maybe_sasl_authz(
self,
value: Option<String>,
) -> VNCBuilder<SetSaslAuthz<S>>where
S::SaslAuthz: IsUnset,
pub fn maybe_sasl_authz(
self,
value: Option<String>,
) -> VNCBuilder<SetSaslAuthz<S>>where
S::SaslAuthz: IsUnset,
Optional (Some / Option setters).
Provides the ID of the QAuthZ authorization object against which the client’s SASL username will validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the VNC server is active. If missing, it will default to denying access.
Sourcepub fn acl(self, value: OnOff) -> VNCBuilder<SetAcl<S>>where
S::Acl: IsUnset,
pub fn acl(self, value: OnOff) -> VNCBuilder<SetAcl<S>>where
S::Acl: IsUnset,
Optional (Some / Option setters).
Legacy method for enabling authorization of clients against the
x509 distinguished name and SASL username. It results in the
creation of two authz-list
objects with IDs of
vnc.username
and vnc.x509dname
. The rules for these
objects must be configured with the HMP ACL commands.
This option is deprecated and should no longer be used. The new
sasl-authz
and tls-authz
options are a replacement.
Sourcepub fn maybe_acl(self, value: Option<OnOff>) -> VNCBuilder<SetAcl<S>>where
S::Acl: IsUnset,
pub fn maybe_acl(self, value: Option<OnOff>) -> VNCBuilder<SetAcl<S>>where
S::Acl: IsUnset,
Optional (Some / Option setters).
Legacy method for enabling authorization of clients against the
x509 distinguished name and SASL username. It results in the
creation of two authz-list
objects with IDs of
vnc.username
and vnc.x509dname
. The rules for these
objects must be configured with the HMP ACL commands.
This option is deprecated and should no longer be used. The new
sasl-authz
and tls-authz
options are a replacement.
Sourcepub fn lossy(self, value: OnOff) -> VNCBuilder<SetLossy<S>>where
S::Lossy: IsUnset,
pub fn lossy(self, value: OnOff) -> VNCBuilder<SetLossy<S>>where
S::Lossy: IsUnset,
Sourcepub fn maybe_lossy(self, value: Option<OnOff>) -> VNCBuilder<SetLossy<S>>where
S::Lossy: IsUnset,
pub fn maybe_lossy(self, value: Option<OnOff>) -> VNCBuilder<SetLossy<S>>where
S::Lossy: IsUnset,
Sourcepub fn non_adaptive(self, value: OnOff) -> VNCBuilder<SetNonAdaptive<S>>where
S::NonAdaptive: IsUnset,
pub fn non_adaptive(self, value: OnOff) -> VNCBuilder<SetNonAdaptive<S>>where
S::NonAdaptive: IsUnset,
Optional (Some / Option setters).
Disable adaptive encodings. Adaptive encodings are enabled by default. An adaptive encoding will try to detect frequently updated screen regions, and send updates in these regions using a lossy encoding (like JPEG). This can be really helpful to save bandwidth when playing videos. Disabling adaptive encodings restores the original static behavior of encodings like Tight.
Sourcepub fn maybe_non_adaptive(
self,
value: Option<OnOff>,
) -> VNCBuilder<SetNonAdaptive<S>>where
S::NonAdaptive: IsUnset,
pub fn maybe_non_adaptive(
self,
value: Option<OnOff>,
) -> VNCBuilder<SetNonAdaptive<S>>where
S::NonAdaptive: IsUnset,
Optional (Some / Option setters).
Disable adaptive encodings. Adaptive encodings are enabled by default. An adaptive encoding will try to detect frequently updated screen regions, and send updates in these regions using a lossy encoding (like JPEG). This can be really helpful to save bandwidth when playing videos. Disabling adaptive encodings restores the original static behavior of encodings like Tight.
Optional (Some / Option setters).
Set display sharing policy. ‘allow-exclusive’ allows clients to ask for exclusive access. As suggested by the rfb spec this is implemented by dropping other connections. Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch). This is the default. ‘force-shared’ disables exclusive client access. Useful for shared desktop sessions, where you don’t want someone forgetting specify -shared disconnect everybody else. ‘ignore’ completely ignores the shared flag and allows everybody connect unconditionally. Doesn’t conform to the rfb spec but is traditional QEMU behavior.
Optional (Some / Option setters).
Set display sharing policy. ‘allow-exclusive’ allows clients to ask for exclusive access. As suggested by the rfb spec this is implemented by dropping other connections. Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch). This is the default. ‘force-shared’ disables exclusive client access. Useful for shared desktop sessions, where you don’t want someone forgetting specify -shared disconnect everybody else. ‘ignore’ completely ignores the shared flag and allows everybody connect unconditionally. Doesn’t conform to the rfb spec but is traditional QEMU behavior.
Sourcepub fn key_delay_ms(self, value: usize) -> VNCBuilder<SetKeyDelayMs<S>>where
S::KeyDelayMs: IsUnset,
pub fn key_delay_ms(self, value: usize) -> VNCBuilder<SetKeyDelayMs<S>>where
S::KeyDelayMs: IsUnset,
Optional (Some / Option setters).
Set keyboard delay, for key down and key up events, in milliseconds. Default is 10. Keyboards are low-bandwidth devices, so this slowdown can help the device and guest to keep up and not lose events in case events are arriving in bulk. Possible causes for the latter are flaky network connections, or scripts for automated testing.
Sourcepub fn maybe_key_delay_ms(
self,
value: Option<usize>,
) -> VNCBuilder<SetKeyDelayMs<S>>where
S::KeyDelayMs: IsUnset,
pub fn maybe_key_delay_ms(
self,
value: Option<usize>,
) -> VNCBuilder<SetKeyDelayMs<S>>where
S::KeyDelayMs: IsUnset,
Optional (Some / Option setters).
Set keyboard delay, for key down and key up events, in milliseconds. Default is 10. Keyboards are low-bandwidth devices, so this slowdown can help the device and guest to keep up and not lose events in case events are arriving in bulk. Possible causes for the latter are flaky network connections, or scripts for automated testing.