summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim.hulthe@mullvad.net>2024-09-23 10:06:12 +0200
committerJoakim Hulthe <joakim.hulthe@mullvad.net>2024-09-25 11:44:14 +0200
commitd0b2b24a97e55239ee73e0dc96754bda55f88e63 (patch)
tree1558405f31ea02445c2565b12fb1728c537b5c2b /gui/src/renderer
parent78c7edb64a94dadff4782e57380ec4a69c7c7e34 (diff)
downloadmullvadvpn-d0b2b24a97e55239ee73e0dc96754bda55f88e63.tar.xz
mullvadvpn-d0b2b24a97e55239ee73e0dc96754bda55f88e63.zip
Add setting to leak traffic to apple networks
Co-authored-by: David Lönnhager <david.l@mullvad.net>
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx4
-rw-r--r--gui/src/renderer/components/Settings.tsx68
-rw-r--r--gui/src/renderer/redux/settings/actions.ts14
-rw-r--r--gui/src/renderer/redux/settings/reducers.ts8
-rw-r--r--gui/src/renderer/redux/userinterface/actions.ts16
-rw-r--r--gui/src/renderer/redux/userinterface/reducers.ts8
6 files changed, 116 insertions, 2 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index c961d07258..563899000e 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -245,6 +245,7 @@ export default class AppRenderer {
this.setChangelog(initialState.changelog, initialState.forceShowChanges);
this.setCurrentApiAccessMethod(initialState.currentApiAccessMethod);
this.reduxActions.userInterface.setIsMacOs13OrNewer(initialState.isMacOs13OrNewer);
+ this.reduxActions.userInterface.setIsMacOs14p6OrNewer(initialState.isMacOs14p6OrNewer);
if (initialState.macOsScrollbarVisibility !== undefined) {
this.reduxActions.userInterface.setMacOsScrollbarVisibility(
@@ -321,6 +322,8 @@ export default class AppRenderer {
IpcRendererEventChannel.settings.updateBridgeSettings(bridgeSettings);
public setDnsOptions = (dnsOptions: IDnsOptions) =>
IpcRendererEventChannel.settings.setDnsOptions(dnsOptions);
+ public setAppleServicesBypass = (enabled: boolean) =>
+ IpcRendererEventChannel.settings.setAppleServicesBypass(enabled);
public clearAccountHistory = () => IpcRendererEventChannel.accountHistory.clear();
public setAutoConnect = (value: boolean) =>
IpcRendererEventChannel.guiSettings.setAutoConnect(value);
@@ -826,6 +829,7 @@ export default class AppRenderer {
reduxSettings.updateWireguardDaita(newSettings.tunnelOptions.wireguard.daita);
reduxSettings.updateBridgeState(newSettings.bridgeState);
reduxSettings.updateDnsOptions(newSettings.tunnelOptions.dns);
+ reduxSettings.updateAppleServicesBypass(newSettings.appleServicesBypass);
reduxSettings.updateSplitTunnelingState(newSettings.splitTunnel.enableExclusions);
reduxSettings.updateObfuscationSettings(newSettings.obfuscationSettings);
reduxSettings.updateCustomLists(newSettings.customLists);
diff --git a/gui/src/renderer/components/Settings.tsx b/gui/src/renderer/components/Settings.tsx
index 211679a76c..98d36fb9fd 100644
--- a/gui/src/renderer/components/Settings.tsx
+++ b/gui/src/renderer/components/Settings.tsx
@@ -7,10 +7,20 @@ import { useAppContext } from '../context';
import { useHistory } from '../lib/history';
import { RoutePath } from '../lib/routes';
import { useSelector } from '../redux/store';
-import { AriaDescribed, AriaDescription, AriaDescriptionGroup } from './AriaGroup';
+import {
+ AriaDescribed,
+ AriaDescription,
+ AriaDescriptionGroup,
+ AriaDetails,
+ AriaInput,
+ AriaInputGroup,
+ AriaLabel,
+} from './AriaGroup';
import * as Cell from './cell';
+import InfoButton from './InfoButton';
import { BackAction } from './KeyboardNavigation';
import { Layout, SettingsContainer } from './Layout';
+import { ModalMessage } from './Modal';
import { NavigationBar, NavigationContainer, NavigationItems, TitleBarItem } from './NavigationBar';
import SettingsHeader, { HeaderTitle } from './SettingsHeader';
import {
@@ -28,6 +38,8 @@ export default function Support() {
const connectedToDaemon = useSelector((state) => state.userInterface.connectedToDaemon);
const isMacOs13OrNewer = useSelector((state) => state.userInterface.isMacOs13OrNewer);
+ const isMacOs14p6OrNewer = useSelector((state) => state.userInterface.isMacOs14p6OrNewer);
+
const showSubSettings = loginState.type === 'ok' && connectedToDaemon;
const showSplitTunneling = window.env.platform !== 'darwin' || isMacOs13OrNewer;
@@ -77,6 +89,12 @@ export default function Support() {
<ApiAccessMethodsButton />
</Cell.Group>
+ {isMacOs14p6OrNewer ? (
+ <Cell.Group>
+ <AppleServicesBypass />
+ </Cell.Group>
+ ) : null}
+
<Cell.Group>
<SupportButton />
<AppVersionButton />
@@ -227,6 +245,54 @@ function SupportButton() {
);
}
+function AppleServicesBypass() {
+ const { setAppleServicesBypass } = useAppContext();
+ const appleServicesBypass = useSelector((state) => state.settings.appleServicesBypass);
+
+ return (
+ <AriaInputGroup>
+ <Cell.Container>
+ <AriaLabel>
+ <Cell.InputLabel>
+ {messages.pgettext('settings-view', 'Apple services bypass')}
+ </Cell.InputLabel>
+ </AriaLabel>
+ <AriaDetails>
+ <InfoButton>
+ <ModalMessage>
+ {messages.pgettext(
+ 'settings-view',
+ 'Some Apple services have an issue where the network settings set by Mullvad get ignored, this in turn blocks certain apps.',
+ )}
+ </ModalMessage>
+ <ModalMessage>
+ {messages.pgettext(
+ 'settings-view',
+ 'Enabling this setting allows traffic to specific Apple-owned networks to go outside of the VPN tunnel, allowing services like iMessage and FaceTime to work whilst using Mullvad.',
+ )}
+ </ModalMessage>
+ <ModalMessage>
+ {messages.pgettext(
+ 'settings-view',
+ 'Attention: this traffic will go outside of the VPN tunnel. Any application that tries to can bypass the VPN tunnel and send traffic to these Apple networks.',
+ )}
+ </ModalMessage>
+ <ModalMessage>
+ {messages.pgettext(
+ 'settings-view',
+ 'This a temporary fix and we are currently working on a long-term solution.',
+ )}
+ </ModalMessage>
+ </InfoButton>
+ </AriaDetails>
+ <AriaInput>
+ <Cell.Switch isOn={appleServicesBypass} onChange={setAppleServicesBypass} />
+ </AriaInput>
+ </Cell.Container>
+ </AriaInputGroup>
+ );
+}
+
function DebugButton() {
const history = useHistory();
const navigate = useCallback(() => history.push(RoutePath.debug), [history]);
diff --git a/gui/src/renderer/redux/settings/actions.ts b/gui/src/renderer/redux/settings/actions.ts
index d2a3fb1c4a..80ac3707c1 100644
--- a/gui/src/renderer/redux/settings/actions.ts
+++ b/gui/src/renderer/redux/settings/actions.ts
@@ -93,6 +93,11 @@ export interface IUpdateDnsOptionsAction {
dns: IDnsOptions;
}
+export interface ISetAppleServicesBypass {
+ type: 'SET_APPLE_SERVICES_BYPASS';
+ enabled: boolean;
+}
+
export interface IUpdateSplitTunnelingStateAction {
type: 'UPDATE_SPLIT_TUNNELING_STATE';
enabled: boolean;
@@ -145,6 +150,7 @@ export type SettingsAction =
| IUpdateWireguardDaitaAction
| IUpdateAutoStartAction
| IUpdateDnsOptionsAction
+ | ISetAppleServicesBypass
| IUpdateSplitTunnelingStateAction
| ISetSplitTunnelingApplicationsAction
| ISetObfuscationSettings
@@ -273,6 +279,13 @@ function updateDnsOptions(dns: IDnsOptions): IUpdateDnsOptionsAction {
};
}
+function updateAppleServicesBypass(enabled: boolean): ISetAppleServicesBypass {
+ return {
+ type: 'SET_APPLE_SERVICES_BYPASS',
+ enabled,
+ };
+}
+
function updateSplitTunnelingState(enabled: boolean): IUpdateSplitTunnelingStateAction {
return {
type: 'UPDATE_SPLIT_TUNNELING_STATE',
@@ -343,6 +356,7 @@ export default {
updateWireguardDaita,
updateAutoStart,
updateDnsOptions,
+ updateAppleServicesBypass,
updateSplitTunnelingState,
setSplitTunnelingApplications,
updateObfuscationSettings,
diff --git a/gui/src/renderer/redux/settings/reducers.ts b/gui/src/renderer/redux/settings/reducers.ts
index 6eb595467b..7f806c248c 100644
--- a/gui/src/renderer/redux/settings/reducers.ts
+++ b/gui/src/renderer/redux/settings/reducers.ts
@@ -114,6 +114,7 @@ export interface ISettingsReduxState {
daita?: IDaitaSettings;
};
dns: IDnsOptions;
+ appleServicesBypass: boolean;
splitTunneling: boolean;
splitTunnelingApplications: ISplitTunnelingApplication[];
obfuscationSettings: ObfuscationSettings;
@@ -181,6 +182,7 @@ const initialState: ISettingsReduxState = {
addresses: [],
},
},
+ appleServicesBypass: false,
splitTunneling: false,
splitTunnelingApplications: [],
obfuscationSettings: {
@@ -310,6 +312,12 @@ export default function (
dns: action.dns,
};
+ case 'SET_APPLE_SERVICES_BYPASS':
+ return {
+ ...state,
+ appleServicesBypass: action.enabled,
+ };
+
case 'UPDATE_SPLIT_TUNNELING_STATE':
return {
...state,
diff --git a/gui/src/renderer/redux/userinterface/actions.ts b/gui/src/renderer/redux/userinterface/actions.ts
index 238835318e..a5ee138464 100644
--- a/gui/src/renderer/redux/userinterface/actions.ts
+++ b/gui/src/renderer/redux/userinterface/actions.ts
@@ -61,6 +61,11 @@ export interface ISetIsMacOs13OrNewer {
isMacOs13OrNewer: boolean;
}
+export interface ISetIsMacOs14p6OrNewer {
+ type: 'SET_IS_MACOS14_6_OR_NEWER';
+ isMacOs14p6OrNewer: boolean;
+}
+
export type UserInterfaceAction =
| IUpdateLocaleAction
| IUpdateWindowArrowPositionAction
@@ -73,7 +78,8 @@ export type UserInterfaceAction =
| ISetForceShowChanges
| ISetIsPerformingPostUpgrade
| ISetSelectLocationView
- | ISetIsMacOs13OrNewer;
+ | ISetIsMacOs13OrNewer
+ | ISetIsMacOs14p6OrNewer;
function updateLocale(locale: string): IUpdateLocaleAction {
return {
@@ -160,6 +166,13 @@ function setIsMacOs13OrNewer(isMacOs13OrNewer: boolean): ISetIsMacOs13OrNewer {
};
}
+function setIsMacOs14p6OrNewer(isMacOs14p6OrNewer: boolean): ISetIsMacOs14p6OrNewer {
+ return {
+ type: 'SET_IS_MACOS14_6_OR_NEWER',
+ isMacOs14p6OrNewer,
+ };
+}
+
export default {
updateLocale,
updateWindowArrowPosition,
@@ -173,4 +186,5 @@ export default {
setIsPerformingPostUpgrade,
setSelectLocationView,
setIsMacOs13OrNewer,
+ setIsMacOs14p6OrNewer,
};
diff --git a/gui/src/renderer/redux/userinterface/reducers.ts b/gui/src/renderer/redux/userinterface/reducers.ts
index 89427e9b06..b245522cec 100644
--- a/gui/src/renderer/redux/userinterface/reducers.ts
+++ b/gui/src/renderer/redux/userinterface/reducers.ts
@@ -16,6 +16,7 @@ export interface IUserInterfaceReduxState {
isPerformingPostUpgrade: boolean;
selectLocationView: LocationType;
isMacOs13OrNewer: boolean;
+ isMacOs14p6OrNewer: boolean;
}
const initialState: IUserInterfaceReduxState = {
@@ -30,6 +31,7 @@ const initialState: IUserInterfaceReduxState = {
isPerformingPostUpgrade: false,
selectLocationView: LocationType.exit,
isMacOs13OrNewer: true,
+ isMacOs14p6OrNewer: true,
};
export default function (
@@ -88,6 +90,12 @@ export default function (
isMacOs13OrNewer: action.isMacOs13OrNewer,
};
+ case 'SET_IS_MACOS14_6_OR_NEWER':
+ return {
+ ...state,
+ isMacOs14p6OrNewer: action.isMacOs14p6OrNewer,
+ };
+
default:
return state;
}