Skip to content

Commit

Permalink
feat(suite): external-tor experimental feature
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Dec 2, 2024
1 parent 20fd64c commit 39fcd71
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/suite/src/constants/suite/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -39,4 +39,21 @@ export const EXPERIMENTAL_FEATURES: Record<ExperimentalFeature, ExperimentalFeat
}
},
},
'tor-external': {
title: 'TR_EXPERIMENTAL_TOR_EXTERNAL',
description: 'TR_EXPERIMENTAL_TOR_EXTERNAL_DESCRIPTION',
// TODO: create knowledge base page for this!
// knowledgeBaseUrl: TOR_EXTERNAL_KNOWLEDGE_BASE,
onToggle: async ({ newValue }) => {
const result = await desktopApi.getTorSettings();
if (result.success && result.payload.useExternalTor !== newValue) {
await desktopApi.changeTorSettings({
...result.payload,
useExternalTor: newValue,
});
}
if (!newValue) {
}
},
},
};
9 changes: 9 additions & 0 deletions packages/suite/src/support/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5013,6 +5013,15 @@ const messages = 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:
'Allow you to use Tor daemon running in a external process instead of the one bundled with Trezor Suite.',
},
TR_EARLY_ACCESS: {
id: 'TR_EARLY_ACCESS',
defaultMessage: 'Early Access Program',
Expand Down

0 comments on commit 39fcd71

Please sign in to comment.