Added in API level 30

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
equals(other: Any?)

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

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

Inherited functions

Public methods

equals

Added in API level 30
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 return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

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

Added in API level 30
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

Added in API level 33
fun getIkeTunnelConnectionParams(): IkeTunnelConnectionParams?

Retrieves the ikeTunnelConnectionParams contains IKEv2 configurations, if any was set.

Return
IkeTunnelConnectionParams? This value may be null.

getMaxMtu

Added in API level 30
fun getMaxMtu(): Int

Retrieves the maximum MTU set for this VPN profile.

getPassword

Added in API level 30
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

Added in API level 30
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

Added in API level 30
fun getProxyInfo(): ProxyInfo?

Retrieves the proxy information if any was set

Return
ProxyInfo? This value may be null.

getRsaPrivateKey

Added in API level 30
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

Added in API level 30
fun getServerAddr(): String

Retrieves the server address string.

Return
String This value cannot be null.

getServerRootCaCert

Added in API level 30
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

Added in API level 30
fun getUserCert(): X509Certificate?

Retrieves the user certificate, if any was set.

May be null if the profile is built from an IkeTunnelConnectionParams.

getUserIdentity

Added in API level 30
fun getUserIdentity(): String

Retrieves the user identity.

Return
String This value cannot be null.

getUsername

Added in API level 30
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.

hashCode

Added in API level 30
fun hashCode(): Int
Return
Int a hash code value for this object.

isAutomaticIpVersionSelectionEnabled

Added in API level 34
fun isAutomaticIpVersionSelectionEnabled(): Boolean

Returns whether automatic IP version selection is enabled.

isAutomaticNattKeepaliveTimerEnabled

Added in API level 34
fun isAutomaticNattKeepaliveTimerEnabled(): Boolean

Returns whether automatic NAT-T keepalive timers are enabled.

isBypassable

Added in API level 30
fun isBypassable(): Boolean

Returns whether or not the VPN profile should be bypassable.

isMetered

Added in API level 30
fun isMetered(): Boolean

Returns whether or not the VPN profile should be always considered metered.

toString

Added in API level 30
fun toString(): String
Return
String a string representation of the object.