It is possible to connect a virtual device to a VPN using a VPN client for Android. To do so, we will be using OpenVPN which is easy to set up and has been successfully tested with Genymotion:
The VPN client must be set to use VPN only to specific applications, otherwise your instance will no longer be accessible from the web or gmsaas.
- Install OpenVPN for Android from an APK file or Play Store (see How to install applications with Genymotion SaaS?).
- Setup your VPN connection (see OpenVPN official guide for details).
- Edit your VPN connection profile and slide to "ALLOWED APPS". Disable the option VPN is used for all apps but exclude selected:
- Select the desired applications to apply the VPN to.
- Connect to your VPN server.