OpenVpnClientService
Description
The OpenVpnClientService object represents an OpenVPN client service instance. When enabled/started an OpenVPN client instance for the configuration specified via the configurationName property is started. The corresponding configuration and key files have to be stored inside the /storage/system/openvpn/client directory.
- › Inherits:
Overview
Properties
Methods
Signals
Properties
configurationName
This property holds the name of the configuration, i.e. the name of the OpenVPN client configuration file without the .conf or .ovpn suffix.
- › Type:
String
- › Signal:
configurationNameChanged()
- › Attributes:
Writable
Methods
writeConfigurationFile(String name, String content)
This method writes an OpenVPN configuration file identified with the given name and content.
This method was introduced in InCore 2.7.
- › Returns:
Boolean
Example
import InCore.Foundation 2.5
Application {
OpenVpnClientService {
// use OpenVPN configuration from /storage/system/openvpn/client/my-device.conf
configurationName: "my-device"
}
}