feat: use better embedded Tor (#2453)

* feat: use better embedded Tor

* update docs [skip ci]

* fix: update torch properly add minimum os version for iOS

* fix: use of invalid thread api on iOS

* fix: disable use of lzma and zstd system libraries

* fix: update torch_dart to work on linux
This commit is contained in:
cyan
2025-09-05 23:07:26 +03:00
committed by GitHub
parent f0ca065a48
commit 2dc95b2bf0
42 changed files with 294 additions and 192 deletions
@@ -399,7 +399,7 @@ abstract class DashboardViewModelBase with Store {
String get address => wallet.walletAddresses.address;
@computed
bool get isTorEnabled => CakeTor.instance.enabled;
bool get isTorEnabled => CakeTor.instance!.enabled;
@computed
SyncStatus get status => wallet.syncStatus;
@@ -64,7 +64,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
bool useSocksProxy;
@computed
bool get usesEmbeddedProxy => CakeTor.instance.started;
bool get usesEmbeddedProxy => CakeTor.instance!.started;
@observable
String socksProxyAddress;
@@ -39,7 +39,7 @@ abstract class NodeListViewModelBase with Store {
String getAlertContent(String uri) =>
S.current.change_current_node(uri) +
'${uri.endsWith('.onion') || uri.contains('.onion:') ? '\n' + (CakeTor.instance.enabled ? '' : S.current.orbot_running_alert) : ''}';
'${uri.endsWith('.onion') || uri.contains('.onion:') ? '\n' + (CakeTor.instance!.enabled ? '' : S.current.orbot_running_alert) : ''}';
@computed
bool get enableAutomaticNodeSwitching => settingsStore.enableAutomaticNodeSwitching;
@@ -39,7 +39,7 @@ abstract class PowNodeListViewModelBase with Store {
String getAlertContent(String uri) =>
S.current.change_current_node(uri) +
'${uri.endsWith('.onion') || uri.contains('.onion:') ? '\n' + (CakeTor.instance.enabled ? '' : S.current.orbot_running_alert) : ''}';
'${uri.endsWith('.onion') || uri.contains('.onion:') ? '\n' + (CakeTor.instance!.enabled ? '' : S.current.orbot_running_alert) : ''}';
@computed
bool get enableAutomaticNodeSwitching => settingsStore.enableAutomaticNodeSwitching;
+1 -1
View File
@@ -59,7 +59,7 @@ abstract class StartTorViewModelBase with Store {
await ensureTorStarted(context: null);
while (true) {
await Future.delayed(Duration(milliseconds: 250));
if (CakeTor.instance.port != -1 && CakeTor.instance.started) {
if (CakeTor.instance!.port != -1 && CakeTor.instance!.started) {
break;
}
}