pub struct SessionsNodeProxyBlocking<'c>(_);
Expand description

An OpenVPN 3 Session Object

Implementations§

Creates a new proxy with the default service and path.

Returns a customizable builder for this proxy.

Consumes self, returning the underlying zbus::Proxy.

The reference to the underlying zbus::Proxy.

AccessGrant method

By default, only the user ID (UID) who created the session have access to it. This method used to grant other users access to this session.

Arguments
  • uid - The UID to the user account which is granted access;

AccessRevoke method

This revokes access to a session object for a specific user. Please note that the owner (the user which initiated this session) cannot have its access revoked.

Arguments
  • uid - The UID to the user account which gets the access revoked.

Connect method

This method starts the connection process. This requires that all credentials needed before contacting the server have been provided. It is always a good idea to first call the net.openvpn.v3.sessions.Ready method first to ensure the backend is ready to connect.

Disconnect method

Disconnects a VPN connection. This will shutdown and stop the VPN backend process and the session object will be removed.

LogForward method

This enables log forwarding from the session to the currently connected D-Bus client. The forwarding itself is sent by the net.openvpn.v3.log service.

Arguments
  • enable - Enables or disables the log forwarding.

Pause method

This method pauses an on-going VPN connection.

Arguments
  • reason - A string used for log purposes primarily, describing why the tunnel was paused.

Ready method

This method is to check if the backend VPN client is ready to connect. If it is ready, it will return immediately. If it is not, it will return with a D-Bus error exception providing the reason it is not ready. Most commonly it needs some input from the user, such as user credentials or some challenge token not already provided in the configuration.

Restart method

Completely disconnects and reconnects an active VPN connection.

Resume method

Resumes a paused VPN connection.

UserInputProvide method

This method is used to return information from the front-end application to the backend service.

Arguments
  • type_ - ClientAttentionType reference to query for.
  • group - ClientAttentionGroup reference to query for.
  • id - Request ID to query for, provided by UserInputQueueCheck().
  • value - The frontend’s response to the backend.

UserInputQueueCheck method

This is used to get the proper index values of information requests the backend has asked for and which is not yet satisfied. The index list is tied to a specific (ClientAttentionType, ClientAttentionGroup) tuple.

Arguments
Returns

An array of indexes which needs to be provided.

UserInputQueueFetch method

This method returns details about a specific information request from the backend process.

Arguments
Returns

A tuple consisting of:

  1. type - ClientAttentionType reference.
  2. group - ClientAttentionGroup reference.
  3. id - Request ID.
  4. name - An internal variable name.
  5. description - A description to present to the front-end user.
  6. hidden_input - If true, the user’s input should be masked/hidden.

UserInputQueueGetTypeGroup method

This will return information about various ClientAttentionType and ClientAttentionGroup tuples which contains requests for the front-end application. This information is used when checking the request queue via UserInputQueueCheck().

Returns

An array of tuples of (ClientAttentionType, ClientAttentionGroup).

Create a stream that receives AttentionRequired signals.

This a convenient wrapper around zbus::blocking::Proxy::receive_signal. AttentionRequired signal

This signal is issued whenever the backend needs information, most commonly from the front-end user interface. This can be used to get user credentials or do PKCS#11/SmartCard operations, etc.

See AttentionRequiredArgs.

Create a stream that receives AttentionRequired signals.

This a convenient wrapper around zbus::blocking::Proxy::receive_signal_with_args. AttentionRequired signal

This signal is issued whenever the backend needs information, most commonly from the front-end user interface. This can be used to get user credentials or do PKCS#11/SmartCard operations, etc.

See AttentionRequiredArgs.

Create a stream that receives Log signals.

This a convenient wrapper around zbus::blocking::Proxy::receive_signal. Log signal

See LogArgs.

Create a stream that receives Log signals.

This a convenient wrapper around zbus::blocking::Proxy::receive_signal_with_args. Log signal

See LogArgs.

Create a stream that receives StatusChange signals.

This a convenient wrapper around zbus::blocking::Proxy::receive_signal. StatusChange signal

This signal is issued each time specific events occurs. They can both be from the session object itself or StatusChange messages proxied from the VPN client backend process.

See StatusChangeArgs.

Create a stream that receives StatusChange signals.

This a convenient wrapper around zbus::blocking::Proxy::receive_signal_with_args. StatusChange signal

This signal is issued each time specific events occurs. They can both be from the session object itself or StatusChange messages proxied from the VPN client backend process.

See StatusChangeArgs.

acl property

An array of UID values granted access.

Get the cached value of the acl property, or None if the property is not cached.

Create a stream for the acl property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

backend_pid property

Process ID of the VPN backend client process.

Get the cached value of the backend_pid property, or None if the property is not cached.

Create a stream for the backend_pid property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

config_name property

Name of the configuration profile when the session was started.

Get the cached value of the config_name property, or None if the property is not cached.

Create a stream for the config_name property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

config_path property

D-Bus object path to the configuration profile used.

Get the cached value of the config_path property, or None if the property is not cached.

Create a stream for the config_path property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

dco property

Kernel based Data Channel Offload flag. Must be modified before calling Connect() to override the current setting.

Get the cached value of the dco property, or None if the property is not cached.

Create a stream for the dco property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

device_name property

Virtual network interface name used by this session.

Get the cached value of the device_name property, or None if the property is not cached.

Create a stream for the device_name property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

device_path property

D-Bus object path to the net.openvpn.v3.netcfg device object related to this session.

Get the cached value of the device_path property, or None if the property is not cached.

Create a stream for the device_path property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

last_log property

Contains the last Log signal proxied from the backend process.

Get the cached value of the last_log property, or None if the property is not cached.

Create a stream for the last_log property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

log_forwards property

Log Proxy/forward object paths used by net.openvpn.v3.log to configure the forwarding.

Get the cached value of the log_forwards property, or None if the property is not cached.

Create a stream for the log_forwards property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

log_verbosity property

Defines the minimum log level Log signals should have to be sent.

Get the cached value of the log_verbosity property, or None if the property is not cached.

Create a stream for the log_verbosity property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

owner property

The UID value of the user which did the import.

Get the cached value of the owner property, or None if the property is not cached.

Create a stream for the owner property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

public_access property

If set to true, access control is disabled. Only owner may change this property, modify the ACL or delete the configuration.

Get the cached value of the public_access property, or None if the property is not cached.

Create a stream for the public_access property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

restrict_log_access property

If set to true, only the session owner can modify receive_log_events and log_verbosity, otherwise all granted users can access the log settings.

Get the cached value of the restrict_log_access property, or None if the property is not cached.

Create a stream for the restrict_log_access property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

session_created property

Unix Epoc timestamp of when the session was created.

Get the cached value of the session_created property, or None if the property is not cached.

Create a stream for the session_created property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

session_name property

Name of the VPN session, named by the the OpenVPN 3 Core library on successful connect.

Get the cached value of the session_name property, or None if the property is not cached.

Create a stream for the session_name property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

statistics property

Contains tunnel statistics.

Get the cached value of the statistics property, or None if the property is not cached.

Create a stream for the statistics property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

status property

Contains the last processed StatusChange signal.

Get the cached value of the status property, or None if the property is not cached.

Create a stream for the status property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.

Methods from Deref<Target = Proxy<'c>>§

Get a reference to the associated connection.

Get a reference to the destination service name.

Get a reference to the object path.

Get a reference to the interface.

Introspect the associated object, and return the XML description.

See the xml module for parsing the result.

Get the cached value of the property property_name.

This returns None if the property is not in the cache. This could be because the cache was invalidated by an update, because caching was disabled for this property or proxy, or because the cache has not yet been populated. Use get_property to fetch the value from the peer.

Get the cached value of the property property_name.

Same as cached_property, but gives you access to the raw value stored in the cache. This is useful if you want to avoid allocations and cloning.

Get the property property_name.

Get the property value from the cache or call the Get method of the org.freedesktop.DBus.Properties interface.

Set the property property_name.

Effectively, call the Set method of the org.freedesktop.DBus.Properties interface.

Call a method and return the reply.

Typically, you would want to use call method instead. Use this method if you need to deserialize the reply message manually (this way, you can avoid the memory allocation/copying, by deserializing the reply to an unowned type).

Call a method and return the reply body.

Use call_method instead if you need to deserialize the reply manually/separately.

Call a method and return the reply body, optionally supplying a set of method flags to control the way the method call message is sent and handled.

Use call instead if you do not need any special handling via additional flags. If the NoReplyExpected flag is passed , this will return None immediately after sending the message, similar to call_noreply

Call a method without expecting a reply

This sets the NoReplyExpected flag on the calling message and does not wait for a reply.

Create a stream for signal named signal_name.

Errors

Apart from general I/O errors that can result from socket communications, calling this method will also result in an error if the destination service has not yet registered its well-known name with the bus (assuming you’re using the well-known name as destination).

Same as Proxy::receive_signal but with a filter.

The D-Bus specification allows you to filter signals by their arguments, which helps avoid a lot of unnecessary traffic and processing since the filter is run on the server side. Use this method where possible. Note that this filtering is limited to arguments of string types.

The arguments are passed as a tuples of argument index and expected value.

Create a stream for all signals emitted by this service.

Errors

Apart from general I/O errors that can result from socket communications, calling this method will also result in an error if the destination service has not yet registered its well-known name with the bus (assuming you’re using the well-known name as destination).

Get an iterator to receive owner changed events.

If the proxy destination is a unique name, the stream will be notified of the peer disconnection from the bus (with a None value).

If the proxy destination is a well-known name, the stream will be notified whenever the name owner is changed, either by a new peer being granted ownership (Some value) or when the name is released (with a None value).

Note that zbus doesn’t queue the updates. If the listener is slower than the receiver, it will only receive the last update.

Get an iterator to receive property changed events.

Note that zbus doesn’t queue the updates. If the listener is slower than the receiver, it will only receive the last update.

Get a reference to the underlying async Proxy.

Trait Implementations§

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Converts to this type from the input type.
Serialize this value into the given Serde serializer. Read more
Get the signature for the implementing type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Get the signature for the implementing type. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more