File tree 12 files changed +218
-57
lines changed
mullvad-management-interface
12 files changed +218
-57
lines changed Original file line number Diff line number Diff line change @@ -1086,6 +1086,10 @@ msgctxt "notifications"
1086
1086
msgid "Disconnected and unsecure"
1087
1087
msgstr ""
1088
1088
1089
+ msgctxt "notifications"
1090
+ msgid "Failed to enable split tunneling. Please try again or disable it."
1091
+ msgstr ""
1092
+
1089
1093
msgctxt "notifications"
1090
1094
msgid "Lockdown mode active, connection blocked"
1091
1095
msgstr ""
Original file line number Diff line number Diff line change @@ -1046,6 +1046,12 @@ function convertFromTunnelStateError(state: grpcTypes.ErrorState.AsObject): Erro
1046
1046
...baseError ,
1047
1047
cause : ErrorStateCause . splitTunnelError ,
1048
1048
} ;
1049
+ case grpcTypes . ErrorState . Cause . NEED_FULL_DISK_PERMISSIONS :
1050
+ // TODO: handle correctly
1051
+ return {
1052
+ ...baseError ,
1053
+ cause : ErrorStateCause . splitTunnelError ,
1054
+ } ;
1049
1055
case grpcTypes . ErrorState . Cause . VPN_PERMISSION_DENIED :
1050
1056
// VPN_PERMISSION_DENIED is only ever created on Android
1051
1057
throw invalidErrorStateCause ;
Original file line number Diff line number Diff line change @@ -183,10 +183,18 @@ function getMessage(errorState: ErrorState): string {
183
183
'Your device is offline. The tunnel will automatically connect once your device is back online.' ,
184
184
) ;
185
185
case ErrorStateCause . splitTunnelError :
186
- return messages . pgettext (
187
- 'notifications' ,
188
- 'Unable to communicate with Mullvad kernel driver. Try reconnecting or send a problem report.' ,
189
- ) ;
186
+ switch ( process . platform ?? window . env . platform ) {
187
+ case 'darwin' :
188
+ return messages . pgettext (
189
+ 'notifications' ,
190
+ 'Failed to enable split tunneling. Please try again or disable it.' ,
191
+ ) ;
192
+ default :
193
+ return messages . pgettext (
194
+ 'notifications' ,
195
+ 'Unable to communicate with Mullvad kernel driver. Try reconnecting or send a problem report.' ,
196
+ ) ;
197
+ }
190
198
}
191
199
}
192
200
}
@@ -265,6 +273,7 @@ function getActions(errorState: ErrorState): InAppNotificationAction | void {
265
273
} ,
266
274
} ;
267
275
} else if ( errorState . cause === ErrorStateCause . splitTunnelError ) {
276
+ // TODO: macos: handle this and full disk access error
268
277
return {
269
278
type : 'troubleshoot-dialog' ,
270
279
troubleshoot : {
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ message ErrorState {
142
142
IS_OFFLINE = 7 ;
143
143
VPN_PERMISSION_DENIED = 8 ;
144
144
SPLIT_TUNNEL_ERROR = 9 ;
145
+ NEED_FULL_DISK_PERMISSIONS = 10 ;
145
146
}
146
147
147
148
enum AuthFailedError {
Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ impl From<mullvad_types::states::TunnelState> for proto::TunnelState {
107
107
talpid_tunnel:: ErrorStateCause :: SplitTunnelError => {
108
108
i32:: from ( Cause :: SplitTunnelError )
109
109
}
110
+ #[ cfg( target_os = "macos" ) ]
111
+ talpid_tunnel:: ErrorStateCause :: NeedFullDiskPermissions => {
112
+ i32:: from ( Cause :: NeedFullDiskPermissions )
113
+ }
110
114
} ,
111
115
blocking_error : error_state. block_failure ( ) . map ( map_firewall_error) ,
112
116
auth_failed_error : mullvad_types:: auth_failed:: AuthFailed :: try_from (
@@ -325,10 +329,14 @@ impl TryFrom<proto::TunnelState> for mullvad_types::states::TunnelState {
325
329
Ok ( proto:: error_state:: Cause :: VpnPermissionDenied ) => {
326
330
talpid_tunnel:: ErrorStateCause :: VpnPermissionDenied
327
331
}
328
- #[ cfg( target_os = "windows" ) ]
332
+ #[ cfg( any ( target_os = "windows" , target_os = "macos" ) ) ]
329
333
Ok ( proto:: error_state:: Cause :: SplitTunnelError ) => {
330
334
talpid_tunnel:: ErrorStateCause :: SplitTunnelError
331
335
}
336
+ #[ cfg( target_os = "macos" ) ]
337
+ Ok ( proto:: error_state:: Cause :: NeedFullDiskPermissions ) => {
338
+ talpid_tunnel:: ErrorStateCause :: NeedFullDiskPermissions
339
+ }
332
340
_ => {
333
341
return Err ( FromProtobufTypeError :: InvalidArgument (
334
342
"invalid error cause" ,
You can’t perform that action at this time.
0 commit comments