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 3, 2024
1 parent 0670fff commit 0628e51
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
17 changes: 16 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,19 @@ 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,
});
}
},
},
};
9 changes: 9 additions & 0 deletions packages/suite/src/support/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0628e51

Please sign in to comment.