Page 1 of 1

Automatic config through script ?

Posted: Mon Oct 09, 2023 8:14 am
by stefhes
Hi there,

i want to enroll multiple android devices with openvpn and would like to automate the configuration of the openVPN client app.
I found the possibility to connect/disconnet the client app (see below) and would like a similar skript for configurating the app using a .ovpn-File. Is there a similar command which could be used for this?

Connect Script
sendintent -a "intent:#Intent;action=net.openvpn.openvpn.CONNECT;component=net.openvpn.openvpn/net.openvpn.unified.MainActivity;B.net.openvpn.openvpn.AUTOCONNECT=true;S.net.openvpn.openvpn.AUTOSTART_PROFILE_ID="PUT_YOUR_PROFILE_ID_HERE";end"

Thanks in advance!

Re: Automatic config through script ?

Posted: Wed Oct 11, 2023 10:03 pm
by openvpn_inc
Hello,

I am not aware of a totally automatic way but you can just have the user open the .ovpn file and Connect should pop up and offer to import it.

On OpenVPN Access Server we even can generate token URLs that can be used one-time to trigger Connect to do an import of a profile.

Kind regards,
Johan