diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-07-27 11:31:51 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-08-04 10:52:43 +0200 |
| commit | ce266572221e7a1c5dc7e90646dc3f7708f1c6f9 (patch) | |
| tree | 96f72adfb24a32548b8c25eb80d76175cf24398b /gui/src/shared | |
| parent | b2e6f7a77b35cddd77b60abe4fd8a7d455d556bd (diff) | |
| download | mullvadvpn-ce266572221e7a1c5dc7e90646dc3f7708f1c6f9.tar.xz mullvadvpn-ce266572221e7a1c5dc7e90646dc3f7708f1c6f9.zip | |
Show firewall-blocking application in GUI
Diffstat (limited to 'gui/src/shared')
| -rw-r--r-- | gui/src/shared/daemon-rpc-types.ts | 12 | ||||
| -rw-r--r-- | gui/src/shared/notifications/error.ts | 20 |
2 files changed, 27 insertions, 5 deletions
diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts index bec0275e9b..2c79bc02a5 100644 --- a/gui/src/shared/daemon-rpc-types.ts +++ b/gui/src/shared/daemon-rpc-types.ts @@ -15,6 +15,16 @@ export interface ILocation { bridgeHostname?: string; } +export type FirewallPolicyError = + | { reason: 'generic' } + | { + reason: 'locked'; + details?: { + name: string; + pid: number; + }; + }; + export type TunnelParameterError = | 'no_matching_relay' | 'no_matching_bridge_relay' @@ -25,12 +35,12 @@ export type ErrorStateCause = | { reason: | 'ipv6_unavailable' - | 'set_firewall_policy_error' | 'set_dns_error' | 'start_tunnel_error' | 'is_offline' | 'tap_adapter_problem'; } + | { reason: 'set_firewall_policy_error'; details: FirewallPolicyError } | { reason: 'tunnel_parameter_error'; details: TunnelParameterError } | { reason: 'auth_failed'; details?: string }; diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts index 1a8499739e..748e8130a7 100644 --- a/gui/src/shared/notifications/error.ts +++ b/gui/src/shared/notifications/error.ts @@ -97,10 +97,22 @@ function getInAppNotificationSubtitle(tunnelState: { state: 'error'; details: IE extraMessage = messages.pgettext('in-app-notifications', 'Your kernel may be outdated'); break; case 'win32': - extraMessage = messages.pgettext( - 'in-app-notifications', - 'This might be caused by third party security software', - ); + switch (blockReason.details.reason) { + case 'locked': + if (blockReason.details.details) { + // TODO: Check if this message is ok + extraMessage = `${messages.pgettext( + 'in-app-notifications', + 'An application prevented the policy from being set', + )}: ${blockReason.details.details.name}`; + } else { + extraMessage = messages.pgettext( + 'in-app-notifications', + 'This might be caused by third party security software', + ); + } + break; + } break; } return `${messages.pgettext( |
