The way OpenVPN3 library works is by creating a TUN/TAP interface on the host system. On Android, for example, it's not possible to create two different VPN connections at the same time, but I really need to be able to use 2 or more connections at the same time on my Android app (and possibly iOS and other systems like macOS, Linux, Fuchsia).
I'm reading the OpenVPN3 source code. Of course it can be modified to be used as a library in C++ to open direct connections without calling the system but I'm afraid I end up with something insecure. It's very hard to write secure crypto code.
I cannot use other VPN protocols, it must be OpenVPN.
Is there another option? Since OpenVPN is based on OpenSSL, isn't it just a matter of connecting through OpenSSL and then sending packets to the server? (of course doing the proper interpretation of the .ovpn client file)
Is there another way of doing it that I'm missing?
UPDATE:
I opened an issue and the dev said that I can create a TunBuilder interface. Does someone know where to start? There are millions of classes there