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 |
getType() 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_USER_PASS
static val TYPE_IKEV2_IPSEC_USER_PASS: Int
Value: 6
Public methods
areLocalRoutesExcluded
fun areLocalRoutesExcluded(): Boolean
Returns whether the local traffic is exempted from the VPN.
getType
fun getType(): Int
Returns the profile integer type.
Return | |
---|---|
Int |
Value is android.net.PlatformVpnProfile#TYPE_IKEV2_IPSEC_USER_PASS , android.net.PlatformVpnProfile#TYPE_IKEV2_IPSEC_PSK , or android.net.PlatformVpnProfile#TYPE_IKEV2_IPSEC_RSA |
getTypeString
fun getTypeString(): String
Returns a type string describing the VPN profile type
Return | |
---|---|
String |
This value cannot be null . |
isInternetValidationRequired
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.