Ikev2VpnProfile
class Ikev2VpnProfile : PlatformVpnProfile
| kotlin.Any | ||
| ↳ | android.net.PlatformVpnProfile | |
| ↳ | android.net.Ikev2VpnProfile | |
The Ikev2VpnProfile is a configuration for the platform setup of IKEv2/IPsec VPNs.
Together with VpnManager, this allows apps to provision IKEv2/IPsec VPNs that do not require the VPN app to constantly run in the background.
Summary
| Nested classes | |
|---|---|
|
A incremental builder for IKEv2 VPN profiles |
|
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Boolean |
Indicates whether some other object is "equal to" this one. |
| MutableList<String!> |
Returns all the algorithms allowed by this VPN profile. |
| IkeTunnelConnectionParams? |
Retrieves the ikeTunnelConnectionParams contains IKEv2 configurations, if any was set. |
| Int |
Retrieves the maximum MTU set for this VPN profile. |
| String? |
Retrieves the password. |
| ByteArray? |
Retrieves the pre-shared key. |
| ProxyInfo? |
Retrieves the proxy information if any was set |
| PrivateKey? |
Retrieves the RSA private key. |
| String |
Retrieves the server address string. |
| X509Certificate? |
Retrieves the certificate for the server's root CA. |
| X509Certificate? |
Retrieves the user certificate, if any was set. |
| String |
Retrieves the user identity. |
| String? |
Retrieves the username. |
| Int |
hashCode() |
| Boolean |
Returns whether automatic IP version selection is enabled. |
| Boolean |
Returns whether automatic NAT-T keepalive timers are enabled. |
| Boolean |
Returns whether or not the VPN profile should be bypassable. |
| Boolean |
Returns whether or not the VPN profile should be always considered metered. |
| String |
toString() |
| Inherited functions | |
|---|---|
Public methods
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
The equals method implements an equivalence relation on non-null object references:
- It is reflexive: for any non-null reference value
x,x.equals(x)should returntrue. - It is symmetric: for any non-null reference values
xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any non-null reference values
x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue. - It is consistent: for any non-null reference values
xandy, multiple invocations ofx.equals(y)consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified. - For any non-null reference value
x,x.equals(null)should returnfalse.
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| Parameters | |
|---|---|
obj |
This value may be null. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getAllowedAlgorithms
fun getAllowedAlgorithms(): MutableList<String!>
Returns all the algorithms allowed by this VPN profile.
May be an empty list if the profile is built from an IkeTunnelConnectionParams.
| Return | |
|---|---|
MutableList<String!> |
This value cannot be null. |
getIkeTunnelConnectionParams
fun getIkeTunnelConnectionParams(): IkeTunnelConnectionParams?
Retrieves the ikeTunnelConnectionParams contains IKEv2 configurations, if any was set.
| Return | |
|---|---|
IkeTunnelConnectionParams? |
This value may be null. |
getMaxMtu
fun getMaxMtu(): Int
Retrieves the maximum MTU set for this VPN profile.
getPassword
fun getPassword(): String?
Retrieves the password.
May be null if the profile is not using Username/Password authentication, or the profile is built from an IkeTunnelConnectionParams.
getPresharedKey
fun getPresharedKey(): ByteArray?
Retrieves the pre-shared key.
May be null if the profile is not using Pre-shared key authentication, or the profile is built from an IkeTunnelConnectionParams.
getProxyInfo
fun getProxyInfo(): ProxyInfo?
Retrieves the proxy information if any was set
| Return | |
|---|---|
ProxyInfo? |
This value may be null. |
getRsaPrivateKey
fun getRsaPrivateKey(): PrivateKey?
Retrieves the RSA private key.
May be null if the profile is not using RSA Digital Signature authentication, or the profile is built from an IkeTunnelConnectionParams.
getServerAddr
fun getServerAddr(): String
Retrieves the server address string.
| Return | |
|---|---|
String |
This value cannot be null. |
getServerRootCaCert
fun getServerRootCaCert(): X509Certificate?
Retrieves the certificate for the server's root CA.
May be null if the profile is not using RSA Digital Signature Authentication or Username/Password authentication, or the profile is built from an IkeTunnelConnectionParams.
getUserCert
fun getUserCert(): X509Certificate?
Retrieves the user certificate, if any was set.
May be null if the profile is built from an IkeTunnelConnectionParams.
getUserIdentity
fun getUserIdentity(): String
Retrieves the user identity.
| Return | |
|---|---|
String |
This value cannot be null. |
getUsername
fun getUsername(): String?
Retrieves the username.
May be null if the profile is not using Username/Password authentication, or the profile is built from an IkeTunnelConnectionParams.
isAutomaticIpVersionSelectionEnabled
fun isAutomaticIpVersionSelectionEnabled(): Boolean
Returns whether automatic IP version selection is enabled.
isAutomaticNattKeepaliveTimerEnabled
fun isAutomaticNattKeepaliveTimerEnabled(): Boolean
Returns whether automatic NAT-T keepalive timers are enabled.
isBypassable
fun isBypassable(): Boolean
Returns whether or not the VPN profile should be bypassable.
isMetered
fun isMetered(): Boolean
Returns whether or not the VPN profile should be always considered metered.
toString
fun toString(): String
| Return | |
|---|---|
String |
a string representation of the object. |