Commit Graph

847 Commits (f20062edd5e4d435ac966a1eed913e63c98df1b3)

Author SHA1 Message Date
Frank Lichtenheld e96d8e4289 Bump version to 11.33.0.0
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-12-15 15:34:56 +01:00
Selva Nair 4066c87787 Update CHANGES.rst for 11.33.0
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-15 06:30:19 -08:00
justwho ab39e1b32e Update openvpn-gui-res-zh-hans.rc 2022-12-13 07:41:46 -08:00
Selva Nair 9d83f491d9 Always show persistent connections under a separate sub-menu
Since version 11.30, we scan config-auto folder and show them
in the menu of available connection profiles. To reduce user-confusion,
always group these configs under a submenu ("Persistent Connections")
even when nested config menu view is not in use.

ActivateConfigGroups() is now always called as Persistent and
System profile groups can now go from empty to non-empty
on rescan.

When nested config menu view is enabled, "persistent", "system"
and "user" configs are always shown in separate groups.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-12 14:45:57 -08:00
Selva Nair d24876c863 Re-order persistent and system config groups in menu
Create the parent groups for persistent and system profiles
in advance so that these always appear at the top when nested
config menu view is active.

Also, while rescanning with active connections present, newly
found configs in global config and auto-config folders are added
to their own parent groups instead of to the root groups.

No user-visible changes unless nested config menu view is enabled.
In that case, "Persistent Connections" followed by "System Profiles"
will always appear first in the connections list.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-12 14:45:57 -08:00
Selva Nair b6bbe9dfcd Delete unrecognized escape sequence in openvpn-gui-res-fa.rc
x86_64-w64-mingw32-windres -DHAVE_CONFIG_H -I.   -D_UNICODE  -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -DWINVER=_WIN32_WINNT -i res/openvpn-gui-res.rc -o openvpn-gui-res.o
res/openvpn-gui-res-fa.rc:547: unrecognized escape sequence

- Stale '\ ' from previous commit

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-12 07:07:35 -08:00
Selva Nair 13dd35ef61 Bugfix for management-timeout patch
PR 418 introduced repeatedly trying to connect to the
management interface on timeout. User can exit out of this loop
by "disconnect", but for this to work an explict
call to OnStop() is required. Normally OnStop() is triggered
by management disconnect which won't happen if not connected
in the first place.

Also call OnStop() on all iservice errors instead of waiting for
management timeout which may never happen.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-12 07:07:35 -08:00
Selva Nair 5ea0b4319f Open PLAP debug file in unicode mode
_wfopen requires ccs=<encoding> to support writing of
non-ascii text. This was missed in the initial commit.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-08 18:17:19 -08:00
Selva Nair 5c06c3a0cc Copy new resource ids to all languages
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-08 18:17:19 -08:00
Selva Nair fa0f55e5a3 Localization of strings in PLAP dialog
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-08 18:17:19 -08:00
Selva Nair 3427aeb88f Enable localization of openvpn daemon state names
These strings are displayed in the PLAP progress window.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-08 18:17:19 -08:00
Selva Nair e5ef5038ce Update links in README.rst
- Download link was outdated.
- Link to docs on configuration pointed to the main page of OpenVPN Inc.
  which is hardly helpful -- point to the configuration section of the
  HOW TO instead.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-08 05:48:57 -08:00
Selva Nair 01133d0450 Update CHANGES.rst
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-07 22:25:10 +01:00
Selva Nair be41ff1a0e
Fix truncated text in some dialogs (#551)
undefined
2022-12-05 21:49:55 -05:00
Selva Nair 1663417b63 RTL alignment in PLAP task dialog
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-03 18:03:40 -05:00
Selva Nair 8721cb60c8 Support RTL alignment in echo message window
Message title is left-aligned and text right-aligned and
scrollbar is on the left if language is RTL.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-03 18:03:40 -05:00
Selva Nair 4d99c9b9f9 Respect UI language flow direction in message boxes
- Add a function to check flow direction of currently selected
UI language
- Add MB_RIGHT|MB_RTLREADING to message boxes when language is RTL

Note: though we use MessageBoxEx() for popups, and pass langId to it,
buttons like OK/Cancel are not automatically localized. It seems these
get localized based on the current locale, not the langID passed in.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-03 18:03:40 -05:00
Selva Nair 27e73d0636 Change target Windows version to Windows 7 from Vista
Some features used in the next commit requires this.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-03 18:03:40 -05:00
dany pm 4bf6de6f08 Updated Farsi translation
Signed-off-by: Danial P <daniel.pm307@hotmail.com>
2022-12-03 17:55:52 -05:00
Frank Lichtenheld 280b456b61 Bump version to 11.32.0.0
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-12-02 14:04:57 -05:00
Selva Nair 546471f1ef Farsi: Add explicit LRE markers in some places
In bidirectional text, neutral characters like parentheses
and slashes can get interpreted as RTL when not surrounded by
strong LTR characters. This leads to wrong formatting like
"<Copyright <foo@example.com" instead of "Copyright <foo@example.com>"

Workaround by adding explicit right-to-left embedding marker (U+202a).
(Ref: https://www.unicode.org/reports/tr9/)

For trailing slash in URLs, they are just omitted when not really
required.

Some other minor edits:
- Do not translate "OpenVPN Technologies Inc."
- SOCKES --> SOCKS

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-28 13:25:28 -05:00
Selva Nair 5204df0e80 Use RTL layout for Farsi
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-28 13:25:28 -05:00
justwho 6002404e2b Update openvpn-gui-res-zh-hans.rc 2022-11-11 15:47:37 -05:00
Frank Lichtenheld 82a6701eb5
Merge pull request #540 from flichtenheld/master
Bump version to 11.31.0.0
2022-11-10 18:36:22 +01:00
justwho ed66957dc7 Update openvpn-gui-res-zh-hans.rc 2022-11-08 11:18:40 -05:00
Frank Lichtenheld 7b0479efb5 Bump version to 11.31.0.0
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-11-07 10:29:15 +01:00
Selva Nair 18ba3b2480 PLAP: Document usage in README
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-05 18:18:06 -04:00
Selva Nair f6d844b71d Update README
- Remove description about run-as-admin that is out-dated.
  Simply state that the GUI is supposed to be run as a limited user.

- Document persistent connections support in the GUI.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-05 18:18:06 -04:00
Selva Nair d83ec473ef Forget passwords while stopping persistent connections
In case of persistent connections, openvpn.exe is still running
after a disconnect, and another user can restart it without needing
credentials using cached passwords. Avoid this by sending
"forget-passwords" to the management interface before disconnect.

Only persistent connections are affected.

In openvpn.exe versions >= 2.5.8, this will also clear cached
auth_token, if present.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-05 18:18:06 -04:00
Selva Nair be8a8cca12 Add OpenVPN version in 'About' page
The version of openvpn.exe found at runtime is shown
on the About page.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-05 18:17:11 -04:00
Selva Nair 41a92199e4 Update copyright year in About tab
Also remove related variables from configure.ac
as those are unused since we updated resources to be
MSVC compliant.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-05 18:17:11 -04:00
Selva Nair 2d72958f8d Bump version to 11.30
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-11-04 11:34:26 -04:00
Lev Stipakov 6924b09a35 service: change CheckServiceStatus() return type to VOID
CheckServiceStatus() return value is never used - the status
is set to global options_t struct.

While on it, remove unneccessary "false" argument
and reformat the code.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-10-20 21:25:38 -04:00
Selva Nair 7d078dd151 PLAP: Add an option to register the COM dll
- ShellExecute with runas is used to elevate
- This Option is hidden if PLAP dll is not found in the
  install_path bin folder
- Depends on the presence of openvpn-plap-install.reg
  and openvpn-plap-uninstall.reg in the install-path bin
  folder.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-19 09:49:15 -04:00
Selva Nair 577d982b51 PLAP: try to start automatic service if not running
Connection profiles shown on the login screen using PLAP
requires automatic service that starts openvpn.exe
processes for these profiles.

This commit adds an attempt to start the service from
PLAP dll. The service is started only if any PLAP enabled
profiles are found.

As starting the service can spawn up OpenVPN.exe processes and
the GUI may attach to them, auto-connect in the GUI is
suspended during session lock to leave the connections free to
be controlled from PLAP screen.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-19 09:49:15 -04:00
Selva Nair 67a8db7664 PLAP: Do not show profiles with no management address
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-19 09:49:15 -04:00
Selva Nair d6775b9b71 Persistent connections: show an error msg when connect fails
If '--management' option cannot be parsed in the config file of a
persistent profile (due to missing option, unreadable password etc.),
connecting it from the GUI menu fails.
In such cases show an error message instead of silently failing.
The message is shown only during manual connect attempts,
not during auto-connect or resume.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-19 09:49:15 -04:00
Selva Nair 2ea4bf9229 Add a test program for PLAP provider module
- instantiate OpenVPN PLAP provider which will enumerate configs
  in config-auto directory.
- Attempt to connect each config found one after the other

The test program is deliberately written in C++ as that's how most
Windows programs (and likely, LogonUI.exe) may use the COM object.

Note that duplicate configs are ignored, so ensure  that config
files in config-auto are not "shadowed" by identical named one's
in user's profile or in global config folder.

Additional notes:
The test program is not linked to the plap dll.
Instead it finds the module using CoGetClassObject,
so the plap dll must be registered in the system.

It also tests dynamically loading the dll from
C:\Program Files\OpenVPN\bin\libopenvpn_plap.dll
which should succeed even if the registration is not
proper.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair a60b3c540b Enable MSVC build of libopenvpn_plap.dll
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair c5c856aaa1 Add credentialprovider.h not in mingw-w64
This header has been recently added to mingw-w64 on our
request. Until its available in released versions,
wget it from mingw-w64's github repo.

Only affects autotools-based builds -- MSVC builds will pick the
native header.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair ed0ceeb95b Add a progress dialog during Connect()
- The dialog supports retry and cancel and shows
  a progress marquee

Signed-off-by: Selva Nair <selva.nair@gmail.com
2022-10-17 11:05:44 -04:00
Selva Nair e64b18074f Intercept management callbacks for better control of the UI
- Dialog windows of connections can popup at any time due to
  restarts not in user's control. Avoid this by marking current
  current profile being connected, and intercepting dialogs for
  other profiles.

  This is implemented by hooking into management callbacks such as
  OnPassword, OnNeedOk etc.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Lev Stipakov 70610afc2f Add a BMP image for PLAP tile and use it 2022-10-17 11:05:44 -04:00
Selva Nair a500b9553e Implement Pre-Logon Access Provider for start before logon
- COM interfaces for ICredentialProvider and
  IConnectableCredentialProviderCredential combined
  with a trimmed down user-interface implemented as
  libopenvpn_plap.dll

- Connections autostarted by OpenVPNService are enumerated
  as possible PLAP connections. The user is expected to leave
  these in management hold so that "connect" will popup any
  required user dialogs.

To use:
 - Register the dll as a PLAP provider (see included .reg files)
 - The enumerated connections will show up as tiles in the PLAP
   screen of the login desktop (secure desktop).

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair b828e763ad Some refactoring to help code reuse
- Move MsgToEventLog from main.c to misc.c
- Move dpi_initialize from main.c to misc.c

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair b2f60c239a Change state to connecting/resuming before return from StartOpenVPN
- Early state change from the main thread makes it synchronous and
  thus easier to wait on the connection to complete when started
  programmatically.
  Made use of in Connect() in the PLAP implementation that follows.

Does not affect on the current mode of operation.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair 47f950eca7 Store daemon_state in connection struct
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
Selva Nair 4acafcf355 Parent status and message box windows in the GUI
- Proper parenting is required for PLAP and cannot
  hurt in general. The parent window in GUI mode
  is the main window. In PLAP it will be the handle
  obtained from LogonUI.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00
justwho 89e46df455
Update openvpn-gui-res-zh-hans.rc (#520)
* Update openvpn-gui-res-zh-hans.rc
2022-10-15 12:02:27 -04:00
Lev Stipakov 9294485657 Fix crash on empty state response
OpenVPN3 doesn't yet support "state"
management command without parameters.

While this has to be fixed on OpenVPN3
side, it doesn't mean that gui could simply crash.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-09-02 10:39:52 -04:00