Commit Graph

809 Commits (fa1191b799d68aee38a5cdf3fcad22000c0b2802)

Author SHA1 Message Date
justwho cea3d255ff Update openvpn-gui-res-zh-hans.rc 2022-12-28 08:52:08 -08:00
Frank Lichtenheld 6398b1df56 Bump version to 11.34.0.0
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-12-28 13:17:02 +01:00
Selva Nair 6daee5814f Update CHANGES.rst
Date removed for ease of updating this file.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-28 13:09:27 +01:00
Selva Nair 548aeb0d18 Improve README
- Revise manual installation instructions
- Add a comment on management password
- Mention auto-reconnect feature

Fixes #354

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-27 09:02:35 -08:00
Lev Stipakov 442a48e9e8 BUILD.rst: switch to VS2022
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-12-23 12:02:19 -08:00
Lev Stipakov e9e9dae830 Update vcpkg commit id
This will bump OpenSSL version to 3.0.7, the same
we use for master and release/2.6.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-12-23 12:02:19 -08:00
Selva Nair 8b1976c6e3 Increase max size of management password buffer
As we now allow users to set a management password (for persistent
connections), the max size of password should match what openvpn.exe
can handle (128 or 4096 bytes depending on build options).

Increase the buffer size to 4096 though such large passwords
may not work in practice. 127 bytes + NUL, may be a safe upper limit.

For the random password used for connections spawned by the GUI,
the current size of 15 bytes + NUL is retained.

Fixes: #567
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-22 12:11:55 -08:00
Lev Stipakov 78bdc6ff4f msvc: update to Visual Studio 2022
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-12-22 08:52:59 -08:00
Selva Nair 061e653a19 Add an option to toggle auto-restart feature
The option is enabled by default.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-20 08:46:50 -08:00
Selva Nair fa9e79323b Save active connections on exit and auto-start in next session
New feature: any connection that is not disconnected on exit
will auto-connect when the GUi is started the next time.

There is no option to toggle auto-connect of any profile. Instead,
just connect normally and leave the connection open while closing the
GUI directly or indirectly (on logout, for example). Such a connection
will auto-connect when the GUI is started the next time.

If auto-connect is not desired for a particular connection, stop it
before exit. Or, the whole feature may be disabled in the setings menu
(implemented in next commit).

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-20 08:46:50 -08:00
Selva Nair 07dbb301ef Reposition truncated text in Settings dialogs
Provide more room for some long strings in General and
Advanced settings dialogs in German localization.

fixes #244

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-19 08:52:45 -08:00
Selva Nair 18a09688bf Add support for WEB_AUTH requests from server
WEB_AUTH is treated same way as OPEN_URL with no support
for optional flags in WEB_AUTH message. In particular
proxy is not supported.

Closes #414

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-19 07:12:44 -08:00
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