Commit Graph

224 Commits (326b078e80048b98c8226af836c979ef13929261)

Author SHA1 Message Date
Selva Nair a8771e94a2 Delete an extraneous backslash in the resource file for Russian
- Fixes: res/openvpn-gui-res-ru.rc:414: unrecognized escape sequence

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2023-02-23 08:04:06 -08:00
bovirus e4089c2141
Update italian language (#580)
* Update italian language
2023-01-18 23:12:35 -05:00
Selva Nair 28a568201c Handle CONNECTED,ROUTE_ERROR state message
When connected, the daemon now reports the state as
CONNECTED,ROUTE_ERROR on routing errors that would have been
reported as CONNECTED,SUCCESS in the past.

To not overly disrupt the current behaviour we treat CONNECTED,ROUTE_ERROR
almost the same was as CONNECTED,SUCCESS except that an error is logged and
the status window is popped up if not already open for all cases other
that CONNECTED,SUCCESS.

Further, the icons on the status window, is left at yellow
and the status text is set to "Connected with routing errors"
in case of ROUTE_ERROR.

Tray and menu icons will change to green. Leaving them yellow is not
persistent as we do not yet have a state variable in the GUI that distinguishes
between "successfully connected" and "connected with route errors".

TODO: re-work this CONNECTED state handling based on how critical
ROUTE_ERROR is in real use.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2023-01-12 10:09:09 +01:00
bovirus d47b5f116d Update italian language 2023-01-07 13:47:03 -08:00
bovirus b25a24f833 Update italian language 2023-01-07 13:47:03 -08:00
bovirus f7d594d314 Update italian language 2023-01-07 13:47:03 -08:00
Selva Nair 99a0c5de29 Fix truncated text in Italian
Text re-positioned in General Settings Window

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-12-30 16:43:25 -08:00
bovirus fa82d6963b Update Italian language
Complete Italian translation
Use the feedback posted in PR 510
Fixed 2021 -> 2022 issue
2022-12-30 16:43:25 -08:00
justwho cea3d255ff Update openvpn-gui-res-zh-hans.rc 2022-12-28 08:52:08 -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 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
justwho ab39e1b32e Update openvpn-gui-res-zh-hans.rc 2022-12-13 07:41:46 -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 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 be41ff1a0e
Fix truncated text in some dialogs (#551)
undefined
2022-12-05 21:49:55 -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
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
justwho ed66957dc7 Update openvpn-gui-res-zh-hans.rc 2022-11-08 11:18:40 -05: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 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 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
Lev Stipakov 70610afc2f Add a BMP image for PLAP tile and use it 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
phoeo 732875d8ff
Add missing Russian localization lines (#517)
* Add missing Russian localization lines

* fix lines mentioned in code review
2022-08-11 14:16:34 -04:00
Selva Nair 170a9b9e76 Copy resources for persistent connections
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-08-08 10:11:25 -04:00
Selva Nair 7f794eec3d Add a button for detaching from the management interface
Useful for releasing the management interface if the user wants to
connect to it by other means.

Detached connections are set to state = detached (no disconnected)
and auto_connect disabled, so that they could be handled properly
during a re-attach.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-08-08 10:11:25 -04:00
Selva Nair 0e76e4b544 Option to disable attaching to persistent connections
Three options are provided to control scanning of persistent
(pre-satrted) connections in config-auto folder, and how they
are attached to.

Auto: Scan and list persistent connections and attach to their
      management i/f automatically at startup, and periodically
      retry on failure to attach.
Manual: Scan and list as above, but do not attach automatically.
      User can attach to such connections by manually clicking
      connect.
Never: Do not scan config-auto folder.

Default is "Auto"

Change of this setting in the settings menu will take full effect
only if none of the connections are in connecting/connected/detached
state so that the connection list can be updated. Otherwise
restart the GUI.

TODO: Copying the settings dialog changes to all languages

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-08-08 10:11:25 -04:00
Selva Nair 8f0dbbc8a3 Always check status of automatic service
- Remove service-only mode (start/stop service) which has not been in
  use since we moved to running the GUI as limited user.
  Also its not very useful as it does not allow any control of
  service-started daemons

- Keep CheckServiceStatus and always check the status of
automatic service.

The status of the service will be used to toggle supporting
control of persistent connections started by the service.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-08-08 10:11:25 -04:00
Selva Nair 428ee29246 Add support for marking connections as persistent
Persistent connections have openvpn.exe daemon started
external to the GUI (e.g., by the automatic service).
This patch adds support for attaching to the management
i/f of such daemons from the GUI and control the connection.

The GUI never stops or starts the openvpn.exe process in this
case. Instead, connect and disconnect buttons signal the
management interface of a running openvpn.exe process to start
the tunnel by attaching to mgmt i/f and sending hold-release if
needed  or stop it and wait in management-hold state
(see DisconnectDaemon()).

When the GUI process exits, persistent connections are left in their
current state using DetachOpenVPN().

No connections are marked as persistent as yet. That is done
in a following commit.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-08-08 10:11:25 -04:00
justwho 552441e407
Update openvpn-gui-res-zh-hans.rc (#514)
* Update openvpn-gui-res-zh-hans.rc

* Update openvpn-gui-res-zh-hans.rc
2022-07-28 09:51:03 -04:00
Selva Nair 4f0b94bf19 Copy new dialog and resources to all language files
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-07-19 12:08:02 +02:00
Selva Nair e548259722 Copy IDS_ERR_URL_IMPORT_PROFILE resource to all language files
This was missed in an earlier commit.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-07-19 12:08:02 +02:00
Selva Nair 84be448777 Handle pkcs11-id query from daemon
Add support for selecting pkcs11-id  from the GUI.
Requires --management-pkcs11-id in the config file.
This option is not added by the GUI.

A list of all available pkcs11 certificates are presented to the
user with buttons OK, Cancel, Retry. OK submits the selected
entry, Cancel closes the connection, Retry reconstructs the
list of certificates by querying the daemon again. The latter
can be used to retry after inserting a token.

If no certificates are found, a message suggesting to insert
a token and press 'Retry' is displayed.

The list shows the "Issued-to", "Issued-by" names
(usually the subject & issuer common names) and valid-until
date in current locale for each certificate.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-07-19 12:08:02 +02:00
justwho f22a45e349 Update openvpn-gui-res-zh-hans.rc 2022-06-21 13:57:11 +02:00
Selva Nair 3e37291e5d Set WS_EX_TOPMOST style on dialogs
This extended style makes the window topmost in z-order.
We currently set this for the user-auth and private-key
passphrase dialogs, but useful for any dialog that may popup
without user interaction.
(Eg., challenge response during a server-initiated restart
or reneg).

Trac: #1465

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-06-20 09:08:54 -04:00
Lev Stipakov d60325acde Support for OpenVPN 3
This adds optional support for using OpenVPN3 client
as an alternative to openvpn2.

Just replacing one client with another will not work:

 - OpenVPN3 doesn't use interactive service, it uses
"agent" service with completely different protocol. OpenVPN GUI
needs to talk to agent using HTTP and JSON.

 - OpenVPN3 management interface realtime notifications must be
explicitly turned on in order for GUI to work.

To enable using openvpn3:

 - use any of *-ovpn3 presets (cmake build system)

 - ./configure --enable-ovpn3 (mingw)

To switch betweet openvpn2 and openvpn3, see "OpenVPN Engine"
radiobutton group in Settings -> Advanced dialog.

OnReady() implementation was slighly changed - "log all on"
replaced with "log on all" - according to management interface
documentation this is the right way to do it, and also OpenVPN3
only supports "on all" order.

Management interface - enabled OpenVPN3 client (omiclient.exe) and
agent (ovpnagent.exe) are now part of openvpn3 repo.

Co-authored-by: Christopher Ng <facboy@gmail.com>
Signed-off-by: Christopher Ng <facboy@gmail.com>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-06-15 10:32:36 -04:00
Selva Nair bb6b6e29fb
Provide more space for challenge dialog text (#469)
* Provide more space for challenge dialog text

We do use a re-sizeable dialog box for dynamic challenge-response
to cater for potentially long lines of challenge text. But the
space specified for the widget is enough for only a single short line
(~60 characters) of text.

Increase the horizontal and vertical space to allow for up to
two lines of ~120 characters per line.

The default size of the Window is not changed. But it is
automatically resized if the space required for the text
is longer than the window width minus some margin. The max
horizontal size of the window is capped at 640 nominal pixels
as longer text will be wrapped in to two lines.

Github issue #468

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-11-29 11:44:13 -05:00
Selva Nair e8257d8672 Copy new string resource to all language files
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-11-18 14:33:09 -05:00
Selva Nair 9c82e666d8 Show a prompt during profile import using --import
The user is prompted with a message showing the config
name that will be imported. The user can accept or cancel
the operation.

If the user was already prompted for over-write permission
because a config with the same name exists, no further dialog
is shown.

Import using the menu (Import File...) is not affected.

Rationale:
We want to set "Import" as the default verb for the context
menu of .ovpn files. This will allow import of configs by
double-click. Also when .ovpn file is downloaded using a browser,
setting the default bowser action to "open" will result in an import.
In such cases a silent import action could be surprising, and a
prompt showing what is being imported could provide a better UX.

On the flip-side, the prompt/dialog will also be shown when import
is done from the context menu of .ovpn by "right click and
choose import" or when "openvpn-gui.exe --import foo"
or "openvpn-gui.exe --command import foo" is executed. As import
is an action that does not result in an immediately visible result
(unlike, say, edit or print), a prompt requiring user action is of
some value even in these cases. At worst it's a minor annoyance.

See also: https://github.com/OpenVPN/openvpn-build/pull/227
and discussions there-in

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-11-18 14:33:09 -05:00
Selva Nair 56ee704501 Use C standrad compliant printf specifications
%S --> %hs in wide format strings, %ls otherwise
%s --> %ls in wide format strings, unchanged otherwise
%c --> %lc in wide format strings

Resource files together have about 970 lines affected and
were edited by looping through all with
sed -i 's/%S/%hs/g' $file
sed -i 's/%s/%ls/g' $file
All other files were manually changed (about 85 lines).

Recent versions of mingw-w64 implicitly turns on __USE_MINGW_ANSI_STDIO
if _GNU_SOURCE, _XOPEN_SOURCE etc are defined (which we do usei).

This breaks non-standard spec such as %S. Anyway, we have been
gradually getting rid of those.

MSVC builds should not be affected.

v2: multiple occurrences in same line was missed in v1 (/g missing in
sed expression). Fixed.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-11-03 16:20:17 -04:00
PlayDay b19965dd2b Fix typo in openvpn-gui-res-ua.rc 2021-11-02 09:33:01 -04:00
Selva Nair 4e223916ae Copy resource changes to all languages
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-08-31 21:55:59 -04:00
Selva Nair e80a39c825 Implement importing profile from a generic URL
ParseUrl extended to parse generic URLs and parse
the path. DownloadProfile() function re-factored
for reuse with generic URL.

Also:
- INTERNET_FLAG_RELOAD added to the request
  call to force reloading the data from server instead
  of using possibly cached data.
- Input box for URL extended in length to about
   50 characters wide.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-08-31 21:55:59 -04:00
Selva Nair 480d9e456b Copy changes to all language resource files
For openvpn-res-cs.rc, some missing help message
entries are also copied.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-08-31 14:48:20 -04:00
Selva Nair 8e4183f9a9 Add '--command import' command line option
Import a config file from command line as

`openvpn-gui.exe --command import <file-path>`

The command is send to a running instance if any.
Otherwise the GUI extecutable is started and
the import processed.

`openvpn-gui --import <file-path>`

is interpreted as the same command.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2021-08-31 14:48:20 -04:00
Lev Stipakov c7beb04ff5 URL profile import: download and import profile
Use WinInet to download profile into memory buffer.
If there are certain certificate errors (invalid CN,
wrong date, unknown CA, revocation check failed),
ask if user wants to continue.

Extract profile name from content, sanitize name and
save profile in temp directory. Then import profile
using existing facilities.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-08-23 12:07:18 -04:00