diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-09-03 16:10:44 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-09-17 10:44:20 -0300 |
| commit | 45e716ae0ea4fc8525bc76e8f8a44661577d1e0d (patch) | |
| tree | ea3946d9a3b29a095d9d921022fe0985d09519a2 | |
| parent | 3620bcf79f2fa357a409e968dc5ef71cd1fb7dc9 (diff) | |
| download | mullvadvpn-45e716ae0ea4fc8525bc76e8f8a44661577d1e0d.tar.xz mullvadvpn-45e716ae0ea4fc8525bc76e8f8a44661577d1e0d.zip | |
Add `BlockReason::AuthFailed`
| -rw-r--r-- | gui/packages/desktop/src/renderer/components/Connect.js | 2 | ||||
| -rw-r--r-- | gui/packages/desktop/src/renderer/lib/daemon-rpc.js | 2 | ||||
| -rw-r--r-- | talpid-types/src/tunnel.rs | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/gui/packages/desktop/src/renderer/components/Connect.js b/gui/packages/desktop/src/renderer/components/Connect.js index f04f33a492..315c83ffc5 100644 --- a/gui/packages/desktop/src/renderer/components/Connect.js +++ b/gui/packages/desktop/src/renderer/components/Connect.js @@ -41,6 +41,8 @@ type State = { function getBlockReasonMessage(reason: BlockReason): string { switch (reason) { + case 'auth_failed': + return 'Authentication failed'; case 'ipv6_unavailable': return 'Could not configure IPv6, please enable it on your system or disable it in the app'; case 'set_security_policy_error': diff --git a/gui/packages/desktop/src/renderer/lib/daemon-rpc.js b/gui/packages/desktop/src/renderer/lib/daemon-rpc.js index b884002403..630d813490 100644 --- a/gui/packages/desktop/src/renderer/lib/daemon-rpc.js +++ b/gui/packages/desktop/src/renderer/lib/daemon-rpc.js @@ -42,6 +42,7 @@ const LocationSchema = object({ }); export type BlockReason = + | 'auth_failed' | 'ipv6_unavailable' | 'set_security_policy_error' | 'start_tunnel_error' @@ -230,6 +231,7 @@ const AccountDataSchema = object({ }); const allBlockReasons: Array<BlockReason> = [ + 'auth_failed', 'ipv6_unavailable', 'set_security_policy_error', 'start_tunnel_error', diff --git a/talpid-types/src/tunnel.rs b/talpid-types/src/tunnel.rs index ab2b76ae96..bd275899f9 100644 --- a/talpid-types/src/tunnel.rs +++ b/talpid-types/src/tunnel.rs @@ -30,6 +30,8 @@ impl TunnelStateTransition { #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum BlockReason { + /// Authentication with remote server failed. + AuthFailed, /// Failed to configure IPv6 because it's disabled in the platform. Ipv6Unavailable, /// Failed to set security policy. @@ -43,6 +45,7 @@ pub enum BlockReason { impl fmt::Display for BlockReason { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { let description = match *self { + BlockReason::AuthFailed => "Authentication with remote server failed", BlockReason::Ipv6Unavailable => { "Failed to configure IPv6 because it's disabled in the platform" } |
