Added in API level 30

PlatformVpnProfile


abstract class PlatformVpnProfile
kotlin.Any
   ↳ android.net.PlatformVpnProfile

PlatformVpnProfile represents a configuration for a platform-based VPN implementation.

Platform-based VPNs allow VPN applications to provide configuration and authentication options to leverage the Android OS' implementations of well-defined control plane (authentication, key negotiation) and data plane (per-packet encryption) protocols to simplify the creation of VPN tunnels. In contrast, VpnService based VPNs must implement both the control and data planes on a per-app basis.

Summary

Constants
static Int

static Int

static Int

Public methods
Boolean

Returns whether the local traffic is exempted from the VPN.

Int

Returns the profile integer type.

String

Returns a type string describing the VPN profile type

Boolean

Returns whether this VPN should undergo Internet validation.

Constants

TYPE_IKEV2_IPSEC_PSK

Added in API level 30
static val TYPE_IKEV2_IPSEC_PSK: Int
Value: 7

TYPE_IKEV2_IPSEC_RSA

Added in API level 30
static val TYPE_IKEV2_IPSEC_RSA: Int
Value: 8

TYPE_IKEV2_IPSEC_USER_PASS

Added in API level 30
static val TYPE_IKEV2_IPSEC_USER_PASS: Int
Value: 6

Public methods

areLocalRoutesExcluded

Added in API level 33
fun areLocalRoutesExcluded(): Boolean

Returns whether the local traffic is exempted from the VPN.

getTypeString

Added in API level 30
fun getTypeString(): String

Returns a type string describing the VPN profile type

Return
String This value cannot be null.

isInternetValidationRequired

Added in API level 33
fun isInternetValidationRequired(): Boolean

Returns whether this VPN should undergo Internet validation. If this is true, the platform will perform basic validation checks for Internet connectivity over this VPN. If and when they succeed, the VPN network capabilities will reflect this by gaining the NetworkCapabilities#NET_CAPABILITY_VALIDATED capability. If this is false, the platform assumes the VPN either is always capable of reaching the Internet or intends not to. In this case, the VPN network capabilities will always gain the NetworkCapabilities#NET_CAPABILITY_VALIDATED capability immediately after it connects, whether it can reach public Internet destinations or not.