Skip to content

Commit

Permalink
Version 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Desktop Commit Bot committed Nov 15, 2021
1 parent d408b4a commit 222b640
Show file tree
Hide file tree
Showing 26 changed files with 5,594 additions and 5,153 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### v3.1.1

* Added a notice about split tunnel issues on macOS Monterey

### v3.1.0

* Added support for Wayland display server on Linux
Expand Down
22 changes: 22 additions & 0 deletions client/res/components/common/ClientNotifications.qml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,27 @@ Item {
NativeHelpers.reinstallWfpCalloutStatus === "reboot"
}

// Display the notification whenever split tunnel is enabled and the user is on macOS Monterey.
// Don't allow the notification to be dismissed. Use "info" level (green)
// Use the following message: `Please disable the Split Tunnel feature if you're having trouble
// connecting to the internet.`
// Add a link labeled `Disable Split Tunnel` that turns off the split tunnel setting.
// (This should consequently hide the notification, since it only appears when ST is enabled.)

NotificationStatus {
id: splitTunnelMonterey
message: SettingsMessages.stMontereyNotification
severity: severities.info
links: [{
text: uiTr("Settings"),
clicked: function() { showPage("split-tunnel")}
}]
dismissible: false
active: Daemon.settings.splitTunnelEnabled &&
Qt.platform.os === "osx" &&
NativeHelpers.osMajorVersion === 12
}

// Notification for the OpenVPN "authorization failure" error.
// Although this OpenVPN error has a very specific meaning, for PIA this does
// not mean that the user's credentials are incorrect. For example, if the
Expand Down Expand Up @@ -629,6 +650,7 @@ Item {
wintunMissing,
splitTunnelUninstalled,
splitTunnelReboot,
splitTunnelMonterey,
authFailure,
dnsConfigFailed,
hnsdFailing,
Expand Down
6 changes: 6 additions & 0 deletions client/res/components/settings/SettingsMessages.qml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,10 @@ QtObject {
readonly property string dataAuthenticationSetting: uiTranslate("ConnectionPage", "Data Authentication")
readonly property string handshakeSetting: uiTranslate("ConnectionPage", "Handshake")
readonly property string defaultRemotePort: uiTranslate("ConnectionPage", "Default")

// These are here for now so we can order translations.
readonly property string stMontereyConfirmation: uiTr("You may encounter internet connection issues on macOS Monterey when the Split Tunnel feature is turned on. Please disable the Split Tunnel feature if you're having trouble connecting to the internet.")
readonly property string stMontereyNotification: uiTr("Please disable the Split Tunnel feature if you're having trouble connecting to the internet.")
readonly property string stMontereyPushNotification: uiTr("macOS Monterey has introduced an issue with Split Tunnel on some systems. If you can't reach the internet, disable Split Tunnel.")
readonly property string stMontereyPushLink: uiTr("Disable Split Tunnel")
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,32 @@ Page {
// can also trigger a driver (re)install, so this indicates that we
// should handle the result here.
property bool installingDriver: false
property bool confirming: false

onCurrentValueChanged: {
if(currentValue === daemonSetting.currentValue)
if(currentValue === daemonSetting.currentValue || confirming)
return

// Disabling is always allowed
if(!currentValue) {
daemonSetting.currentValue = currentValue
return
}
if (Qt.platform.os === 'osx' && NativeHelpers.osMajorVersion === 12) {
confirming = true
currentValue = false
confirmDialog.show()
} else {
continueEnabling()
}
}

function cancelEnabling() {
confirming = false
}
function continueEnabling() {
currentValue = true
confirming = false
// If we're already installing or a reboot is needed, we can't enable
// (the control should be disabled in this case)
if(!appExclusionCheckbox.canStartInstall) {
Expand Down Expand Up @@ -271,6 +286,31 @@ Page {
SplitTunnelAddIpDialog {
id: addIpDialog
}
OverlayDialog {
id: confirmDialog

buttons: [Dialog.Ok, Dialog.Cancel]
contentWidth: 300

DialogMessage {
width: parent.width
icon: 'info'
text: SettingsMessages.stMontereyConfirmation
color: Theme.settings.inputLabelColor
}

function show() {
visible = true
focus = true
open()
}
onAccepted: {
appExclusionSetting.continueEnabling();
}
onRejected: {
appExclusionSetting.cancelEnabling();
}
}
}

}
6 changes: 6 additions & 0 deletions client/src/nativehelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <QElapsedTimer>
#include <QCursor>
#include <QLibrary>
#include <QOperatingSystemVersion>

#ifdef Q_OS_MACOS
#include "mac/mac_install.h"
Expand Down Expand Up @@ -331,6 +332,11 @@ void NativeHelpers::setDockVisibility(bool enabled)
#endif
}

int NativeHelpers::getMajorOSVersion() const
{
auto current = QOperatingSystemVersion::current();
return current.majorVersion();
}

auto NativeHelpers::getPlatform() const -> Platform
{
Expand Down
3 changes: 3 additions & 0 deletions client/src/nativehelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class NativeHelpers : public QObject
// We do not translate the product name.
Q_PROPERTY(QString productName READ getProductName FINAL CONSTANT)

Q_PROPERTY(int osMajorVersion READ getMajorOSVersion FINAL CONSTANT)

// Whether the client is currently logging to a file. This exposes the flag
// from Logger, which works with or without a daemon connection.
Q_PROPERTY(bool logToFile READ getLogToFile NOTIFY logToFileChanged)
Expand Down Expand Up @@ -238,6 +240,7 @@ class NativeHelpers : public QObject
private:
Platform getPlatform() const;
QString getProductName() const;
int getMajorOSVersion() const;
bool getIncludeFeatureHandshake() const;
bool getLogToFile();
bool getSplitTunnelSupported() const;
Expand Down
Loading

0 comments on commit 222b640

Please sign in to comment.