Commit Graph

19 Commits (81e67d1ffd902614e65aaac3fdc91f8ec2dbd7fb)

Author SHA1 Message Date
Selva Nair 43d0ef3a5a Handle interactive service policy restrictions
When a connection is attempted using a config in a location
that would fail, offer an option to add the user to the "OpenVPN
Administrators" group. This is done using shell-execute which will
show a UAC prompt for elevation. If it fails (due to user chooses
NO or the UAC dialog fails) the connection is not started.

v2 Changes
 - Rebase to master
 - Automaticlaly add the admin group if it doesn't exist
 - Allow unicode strings in debug output
 - Use domain\username to identify user
 - Fix the PrintDebug macro

Minor changes based on user feedback
 - Bring the window back to foreground after UAC prompt completion
 - Show a message if another connection is tried during authorization
 - Do not add user to ovpn_admin_group if it is same as the built-in admin group

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-03-13 20:23:20 -04:00
Selva Nair 77538dd0d0 Support user and global config directories
- Set default config directory (config_dir) to %UserProfile%\OpenVPN\config
  (saved and read back from HKCU\Software\OpenVPN-GUI\config_dir)

- Add a global_config_dir variable read from HKLM\Software\OpenVPN\config_dir
  or set to OpenVPN-install-path\config

- Scan both directories and their sub directories for connection profiles.
  In case of name conflicts config_dir gets priority over global_config_dir

- Eliminate multiple warnings of duplicate configs

Fixed on review (Thanks to leobasilio@gmail.com)

- Fix wrongly used o.config_dir in 2 locations
- Unrelated: Added missing  CheckIServiceStatus to service.h

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-03-01 15:50:02 -05:00
Selva Nair 352e44f03d Better error reporting when connection fails to come up
- Handle early errors (openvpn exits before management connection is up)
    with a helpful error message that points the user to view log.
- Include only readable config files in the connection list
- Warn if no connection profiles found

TODO: handle startup errors from interactive service
2016-02-16 15:57:37 -05:00
Heiko Hund 47cff87477 make auth popups show when returning from suspend 2013-04-25 17:53:16 +02:00
Heiko Hund 77d2f5b2b2 make MAX_CONFIGS a autoconf precious variable
You can now define up to how many configuration files you want
to support by stating something like

  ./configure MAX_CONFIGS=150 ...

when invoking configure. Default value remains 50.
2013-04-12 20:16:04 +02:00
Heiko Hund 15287dc5ea correct how data from mgmt itf is received 2012-10-31 16:33:32 +01:00
Heiko Hund 3c81b7a4f2 support SOCKS 5 proxy auth notifications from mgmt 2012-07-20 11:55:10 +02:00
Heiko Hund b9edb7e62a keep trying to connect to mgmt itf for 15 seconds 2012-05-08 16:50:26 +02:00
Heiko Hund 3670a4bd2a support starting OpenVPN via interactive service 2012-01-31 09:40:08 +00:00
Heiko Hund 42b3ead5f0 fix symbol clash 2011-07-21 09:01:04 +02:00
Heiko Hund 8249067076 let openvpn determine the Windows proxy settings 2011-07-20 17:28:08 +02:00
Heiko Hund 9d918954d5 ask for HTTP proxy credentials on demand
* use "auto" parameter for --http-proxy option
 * pass proxy credentialsls via management interface
 * also closes #3223163
2011-03-24 17:54:53 +01:00
Heiko Hund 4bcebba60f use managment interface 2010-09-10 11:39:39 +02:00
Heiko Hund 7c4bea3f7e remove support for openvpn version < 2.0 2010-06-29 16:12:17 +02:00
Heiko Hund a6e6d88115 refactor option handling code 2010-04-09 06:18:58 +02:00
Heiko Hund b0c1bd562c reformat and fix config file code
* make sure strings are \0 terminated
 * remove obsolete string IDS_ERR_LOG_CONSTRUCT
2010-03-21 21:32:48 +01:00
Heiko Hund 61cb987f4d make it work when compiled as unicode 2010-03-21 10:07:14 +01:00
Heiko Hund d646c7fc8c fixed compiler warnings 2009-01-19 12:28:26 +00:00
Heiko Hund fd9e4ae6db import of openvpn-gui-1.0.3.zip
git-svn-id: https://openvpn-gui.svn.sourceforge.net/svnroot/openvpn-gui/trunk@2 43a1345a-9c20-4331-951f-9845fc178312
2008-12-18 11:08:35 +00:00