Skip to content

Commit bc3da1c

Browse files
committed
frontend: disable option to connect via tor proxy on ios
The Tor proxy can currently not be used on iOS. iOS restricts exposing local ports to other apps.
1 parent e8662b1 commit bc3da1c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Disabled the option to enable Tor proxy on iOS
45

56
## v4.48.1
67
- Format BTC/sat spaces consistently in account summary and total balance

frontends/web/src/locales/en/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@
819819
"buy_crypto": "Buy crypto",
820820
"enabled_false": "Disabled",
821821
"enabled_true": "Enabled",
822+
"noOptionOnIos": "Not available on iOS",
822823
"noOptions": "No options found",
823824
"receive": "Receive {{coinCode}}",
824825
"receive_bitcoin": "Receive Bitcoin",

frontends/web/src/routes/settings/components/advanced-settings/enable-tor-proxy-setting.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

1717
import { Dispatch, useState } from 'react';
1818
import { useTranslation } from 'react-i18next';
19+
import type { TProxyConfig } from '@/routes/settings/advanced-settings';
1920
import { SettingsItem } from '@/routes/settings/components/settingsItem/settingsItem';
2021
import { TorProxyDialog } from './tor-proxy-dialog';
2122
import { Message } from '@/components/message/message';
22-
import { TProxyConfig } from '@/routes/settings/advanced-settings';
23+
import { runningInIOS } from '@/utils/env';
2324
import styles from './enable-tor-proxy-setting.module.css';
2425

2526
type TProps = {
@@ -34,6 +35,15 @@ export const EnableTorProxySetting = ({ proxyConfig, onChangeConfig }: TProps) =
3435

3536
const proxyEnabled = proxyConfig ? proxyConfig.useProxy : false;
3637

38+
const isIOS = runningInIOS();
39+
const displayedValue = (
40+
isIOS
41+
? t('generic.noOptionOnIos')
42+
: proxyEnabled
43+
? t('generic.enabled_true')
44+
: t('generic.enabled_false')
45+
);
46+
3747
return (
3848
<>
3949
{ showRestartMessage ? (
@@ -44,9 +54,9 @@ export const EnableTorProxySetting = ({ proxyConfig, onChangeConfig }: TProps) =
4454
<SettingsItem
4555
className={styles.settingItem}
4656
settingName={t('settings.expert.useProxy')}
47-
onClick={() => setShowTorProxyDialog(true)}
57+
onClick={isIOS ? undefined : () => setShowTorProxyDialog(true)}
4858
secondaryText={t('newSettings.advancedSettings.torProxy.description')}
49-
displayedValue={proxyEnabled ? t('generic.enabled_true') : t('generic.enabled_false')}
59+
displayedValue={displayedValue}
5060
/>
5161
<TorProxyDialog
5262
open={showTorProxyDialog}

0 commit comments

Comments
 (0)