Is this possible, and how?
Here's the scenario:
Public Web Server hosts basic content for general public.
Private server inside a VPN hosts special subscriber content and services.
The two servers may not be on the same hardware.
Subscribers have a device with appropriate VPN software with appropriate certificates, logins, etc. For this discussion, let's postulate Android tablet with StrongSwan, but it is really more than just that.
Upon seeking subscriber content, the subscriber opens StrongSwan and initiates the VPN, at which point the Android is off the Internet and on the private network for narrow, special purposes.
The system I describe, more or less, is presently up and running, but Step 4 is presently an inconvenient manual step which the subscriber must initiate.
I would like to automate this step, allow the Internet surfing Android user to click a link on the public page, and have the VPN initiated automatically and control passed to the "inside the VPN" services. At termination of the subscription-based application, the VPN would be taken down and normal Internet access resumes.
Placing code on the web page is one thing. Initiating the VPN on the Android client is less clear to me. The system should also, ideally, detect when the user does not have the appropriate certificates, etc., and send the user to a sign-up page to subscribe to the services.
Am I asking for the moon? Or is this something easily done of which I am simply ignorant?