Class of android.net · VpnService.java · Android's reference
public class VpnService extends android.app.Service
VpnService ← Service ← ContextWrapper ← Context
A VPN app's service (Off in docs/android/INTERFACES.md: the device makes no TUN interface). prepare gives no consent screen to show, as for an app the user already allowed, and a Builder's establish fails as Android's does when the interface can't be made: null. Sockets need no protecting, as no VPN routes them.
public static final String SERVICE_INTERFACE = "android.net.VpnService" sourcepublic static final String SERVICE_META_DATA_SUPPORTS_ALWAYS_ON = "android.net.VpnService.SUPPORTS_ALWAYS_ON" sourcepublic VpnService() empty body sourcepublic static Intent prepare(Context context) sourcepublic boolean protect(int socket) sourcepublic boolean protect(java.net.Socket socket) sourcepublic boolean protect(java.net.DatagramSocket socket) sourcepublic boolean addAddress(InetAddress address, int prefixLength) sourcepublic boolean removeAddress(InetAddress address, int prefixLength) sourcepublic boolean setUnderlyingNetworks(Network[] networks) sourcepublic final boolean isAlwaysOn() sourcepublic final boolean isLockdownEnabled() sourcepublic IBinder onBind(Intent intent) sourcepublic void onRevoke() sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.