views:

22

answers:

0

I offer a VPN service to my users, and a lot of them complain that it's a hassle to set up a new VPN connection and switch to it every time they want to connect to my VPN.

After doing some research I found there are ways to do this programatically, for example:

http://hidemyass.com/vpn/

This service offers a program to connect to their VPN service with a username or password. I can do most of this stuff myself, but what I really need help with is how they would connect to the VPN with the program, and how they do it programatically.

What I'd idealy need to do is in the list below:

  1. Create a temporary new connection to connect to the internet through VPN
  2. Switch to that connection when the user presses "Connect"
  3. When the user presses "Disconnect", switch back to their main connection
  4. Destroy the temporary connection to the VPN

If anyone knows how this is done and could possible steer me in the right direction, I'd be very greatful. Also I'd prefer to do this in C# but other langues references would be helpful aswell. Thanks.