Stunnel + OpenVPN on Android
Connecting your Android with Stunnel and OpenVPN is possible
Pre-requisites
Before you read on, just a quick note that this article assumes you have already set up a Stunnel and OpenVPN server. If not, please ensure you already have that set up. Here’s how I managed to set mine up.
Also, I haven’t really got round to full test this on the rest of the Android version. So, as a disclaimer, I’ve managed to get it working on Android Pie (v9) and Android Oreo (v8).
Installing the Apps
Get the following apps from the Google Play Store. There might be different clients available for OpenVPN, but this was the one that worked for me and I really like the fact that I am able to do split tunneling on the different apps.
Download your Keys and Configs
Download the following files from your server.
openvpn.conf
— To keep things simple I place myca.crt
,client.key
andclient.crt
into the config file, so that I can directly import into the clientstunnel.p12
— If you have the pem file, this won’t work, you need to generate the p12 on the server and download it to your device.