Commit Graph

35 Commits (b3f55135fbc9895e48a26e8cb150d8d11182e6aa)

Author SHA1 Message Date
Selva Nair 9ad57eb415 Add '--command rescan' to rescan config folders
Add an new command 'rescan' that may be sent to a running
instance of the GUI to force it rescan the config folders.

Use case: with an instance of the is GUI running, one can
manually copy a config file to the config folder and start
it using "openvpn-gui --command rescan" followed by
"openvpn-gui --command connect foo"

v2: The calls to rebuild config file list and recreate
menus is refactored into a function.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2020-01-12 16:32:51 -05:00
Selva Nair 7bfb950852 Bug fix config-group data structure
As config group is reallocated when full, do not store the pointer to the
parent group. Instead use the id of the group which is invariant across
reallocs. Similarly in connection array store the id of the group
instead of a pointer.

Also

- Do not call ActivateConfigGroups() -- when connections are active:
  in this case we want preserve config data structures during rescan.

Signed-off-by: Selva Nair <selva.nair@gmail.com>

fixup
2019-02-11 11:51:23 -05:00
Selva Nair 2d64cb5603 Provide support for a hierarchical config menu listing
- Shows all configs in a subdirectory grouped into a
  submenu entry. This hopefully provided a better UX when
  there are more than a few 10's of config files.

- Enabled only if number of configs is > 50 or if the
  option config_menu_view is set to 2.
  To force the current flat listing, set config_menu_view = 1.

TODO: Make config_menu_view user configurable.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-02-11 11:51:23 -05:00
Selva Nair b53c8a758e Fix display of assigned IPs when IPv4 address is absent
- In tray info do not skip the address when v4 ip is absent

- When combining two strings do not add the separator (comma)
  if either is empty.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2018-06-16 16:29:52 -04:00
Selva Nair dd8c4dfdab Show assigned ipv6 address in balloon and tray popup
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2018-01-29 09:40:36 +02:00
Selva Nair 31896ce33b Add restart button to connection menus
- This works the same way as restart button in the status window
  but is more conveniently accessible from the tray menu.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2018-01-20 11:41:19 -05:00
Selva Nair 2f2ddbf3a8 Load icons at sizes given by DPI-dependent system metric
- Check system metric for large and small icon sizes and
  try to load the correct size instaed of scaling from one size.

Scaling will still happen if the required size is not available
in the icon resource. As we add more icon sizes they will
get automatically used as needed.

LoadImage scales up from next smallest size available. Revisit this
when LoadIconWithScaleDown (Vista+) becomes available in mingw.

Resolves Trac: #772 (icon scaling issue)

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-12-08 16:01:58 -05:00
Selva Nair 1a5ce44a99 Handle dynamic challenge/response
- Add a base64 decode function using Windows CyptoAPI
- Move multibyte to widechar conversions to a function
- Add config name to caption of password dialogs to help user
  identify the request
- Add new dialog template for generic password/PIN requests
  and use it to handle dynamic challenge

Note 1: if dynamic challenge response verification fails, an auth-failed
message is returned by the server causing the GUI to clear any saved
password even if the user-auth dialog itself succeeeded.

Note 2: Dialog template ID_DLG_CHALLENGE_RESPONSE added to language
files may require translation.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-11-15 19:14:32 -05:00
Selva Nair 5a47986ccb Make options saved in registry editable by user
Option ediitng dialogs are in two tabs: General and Advanced.
Proxy related options are left in the proxy tab. Options
config_dir, config_ext, log_dir, script timeouts and
service-only flag are in the Advanced tab. All other more commonly
used flags and options are in the General tab.

- As options are editable, save values in registry only when they differ
  from the default values. This leaves the registry clean and makes changing
  options and their defaults during updates easier.

- Entries for config_dir and log_dir must be absolute paths.
  Environemental variables such as %PROFILEDIR% may be used
  to construct these.

- Empty config_dir, config_ext and log_dir entries are silently
  ignored (i.e., the current values are left unchanged).

- Store all numeric and boolean parameters in registry as DWORD instead of
  strings.

- On startup, the default parameters are loaded, then the registry is read
  and finally command-line parameters parsedi.

- Out of range script timeout values in registry truncated with a
  warning instead of fatal error. This allows the user to access the
  settings dialog and make corrections.

- Save proxy and language settings under the same
  HKCU\Software\OpenVPN-GUI key as other options instead of under Nilings.

- Save the current version of the GUI in regsitry so that updates
  can be detected and any needed registry cleanup done.

- If no version info is present in the registry any values in OpenVPN-GUI
  key in HKCU are deleted for a clean start as this is the first version
  to save registry values in HKCU. Language and proxy data if present
  under Nilings is migrated.

Note: new controls in the General tab and newly added Advanced tab dialog
are copied to all language files from the English version. These need to
be translated.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-08-06 11:46:15 -04:00
Selva Nair 1c748e382d Simplify some parameters and registry keys
- Replace allow_password by a runtime check that enables password
  change menu only when the user has write-access to the key file.
- Read exe_path and priority from HKLM and do not duplicate in HKCU.
- Always allow the user to view the config: edit will succeed if user
  has write access.
- Always include the proxy settings tab which is the default.
- Remove the unused power event handling and disconnect_on_suspend key.
- Remove password_attempts -- user can stop the password dilaog
  by clicking cancel.
- Remove allow_service: implicitly enabled if service_only is used.
- Deprecate removed options in cmd-line parser
- Update README.rst
- Close config file before exit in GetKeyFileName
- Close thread and dialog handles in passphrase.c

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-08-06 11:46:15 -04:00
Selva Nair 5880fdcd02 Save username and optionally passwords
- Username and, optionally, password as well as the private
  key passphrase are saved in config-specific registry keys
- All saved data are kept encrypted using DPAPI
- The passphrase dialog is skipped if a valid saved private
  key password is available. However, the user-auth dialog
  is always presented, prefilled with the saved username
  and password.

Note: A text string "Save password" is added to three dialogs
in all language resource files. Additional text with ids
IDS_MENU_CLEARPASS and IDS_NFO_DELETE_PASS are added to the
STRINGTABLE only in the English language resource file.
All these need translations.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-05-29 19:35:30 -04:00
Selva Nair 284a4e27e3 Rescan configs even when connections are active
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2016-05-22 15:41:23 -04:00
Leonardo Basilio 46a1bc715c Adding "Import file" feature 2016-02-16 22:23:23 -02:00
Heiko Hund 47cff87477 make auth popups show when returning from suspend 2013-04-25 17:53:16 +02:00
Heiko Hund 2e53dbd254 localize connection time display in tray tooltip 2012-11-06 14:54:53 +01:00
Heiko Hund 82eb645a5e localize buttons in message boxes when possible 2012-07-20 17:44:48 +02:00
Heiko Hund f420d7dcbb use CRT's _countof instead of proprietary _tsizeof 2012-03-29 17:40:34 +02:00
Alon Bar-Lev c9eb68c77f use automake in build
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

Edited to not use libtool and implicit automake rule to build resource object
2012-03-28 10:59:44 +00:00
Heiko Hund 66b77868b4 move "About" dialog to settings tab 2011-11-30 17:20:23 +01:00
Heiko Hund 4683e8f045 fix popup menu creation 2011-07-26 09:12:11 +02:00
Heiko Hund ed5dfc0bd5 fix IP address display in tooltip, closes #3176526 2011-02-11 11:03:57 +01:00
Heiko Hund a91198d010 fix connection status if only one config exists 2010-09-10 11:40:03 +02:00
Heiko Hund efc62c3d19 fix starting a connection with double click on icon 2010-09-10 11:40:02 +02:00
Heiko Hund 4bcebba60f use managment interface 2010-09-10 11:39:39 +02:00
Heiko Hund 0d04b8b981 produce dist as tarball
* make dist produces a tarball instead of a .zip now
 * removed local copy of shellapi.h
 * snapshot version is now the current date and time
 * snapshot version is now part of the .exe name
2010-04-23 14:18:36 +02:00
Heiko Hund f373ca17f7 tray code cleanup and fixes
* make tray icon reflect connection status again
 * prevent tray context menu popup on right click
 * display proxy settings tab only if enabled
2010-04-23 13:22:05 +02:00
Heiko Hund a6e6d88115 refactor option handling code 2010-04-09 06:18:58 +02:00
Heiko Hund 61cb987f4d make it work when compiled as unicode 2010-03-21 10:07:14 +01:00
Heiko Hund 6939cb8792 replace GUI_* with PACKAGE_* macros 2010-03-11 22:58:45 +01:00
Heiko Hund ad959a520d moved to use of TCHARs in preparation for unicode support 2009-02-09 17:28:38 +00:00
Heiko Hund 5783d7da94 cleaned up resource IDs 2009-02-04 15:54:37 +00:00
Heiko Hund e8dcb2f3ab moved proxy settings into a general settings dialog tab 2009-01-26 21:07:04 +00:00
Heiko Hund d646c7fc8c fixed compiler warnings 2009-01-19 12:28:26 +00:00
Heiko Hund 3d4aaeb5a4 switched to use of localization functions 2009-01-18 20:59:52 +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