ToyVPN is a sample application that shows how to build a VPN client using the VpnService class introduced in API level 14.
This application consists of an Android client and a sample implementation of a server. It performs IP over UDP and is capable of doing seamless handover between different networks as long as it receives the same VPN parameters.
The sample code of the server-side implementation is Linux-specific and is available in the server
directory. To run the server or port it to another platform, please see comments in the code for the details.