diff --git a/packages/suite/src/constants/suite/experimental.ts b/packages/suite/src/constants/suite/experimental.ts index cc01bdd5eb5..57e5c41d6cb 100644 --- a/packages/suite/src/constants/suite/experimental.ts +++ b/packages/suite/src/constants/suite/experimental.ts @@ -5,7 +5,7 @@ import { Route } from '@suite-common/suite-types'; import { Dispatch } from '../../types/suite'; -export type ExperimentalFeature = 'password-manager' | 'tor-snowflake'; +export type ExperimentalFeature = 'password-manager' | 'tor-snowflake' | 'tor-external'; export type ExperimentalFeatureConfig = { title: TranslationKey; @@ -39,4 +39,19 @@ export const EXPERIMENTAL_FEATURES: Record { + const result = await desktopApi.getTorSettings(); + if (result.success && result.payload.useExternalTor !== newValue) { + await desktopApi.changeTorSettings({ + ...result.payload, + useExternalTor: newValue, + }); + } + }, + }, }; diff --git a/packages/suite/src/support/messages.ts b/packages/suite/src/support/messages.ts index 30626c89225..20184a93b99 100644 --- a/packages/suite/src/support/messages.ts +++ b/packages/suite/src/support/messages.ts @@ -5007,6 +5007,15 @@ export default defineMessagesWithTypeCheck({ defaultMessage: 'Access censored websites and apps using Tor Snowflake, a system designed to bypass restrictions.', }, + TR_EXPERIMENTAL_TOR_EXTERNAL: { + id: 'TR_EXPERIMENTAL_TOR_EXTERNAL', + defaultMessage: 'Tor external', + }, + TR_EXPERIMENTAL_TOR_EXTERNAL_DESCRIPTION: { + id: 'TR_EXPERIMENTAL_TOR_EXTERNAL_DESCRIPTION', + defaultMessage: + 'Allows you to use Tor daemon running in a external process on port 9050 instead of the one bundled with Trezor Suite.', + }, TR_EARLY_ACCESS: { id: 'TR_EARLY_ACCESS', defaultMessage: 'Early Access Program',