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
@@ -219,6 +219,17 @@ jobs:
popd popd
cp /opt/generic_cache/key.jks android/app cp /opt/generic_cache/key.jks android/app
- name: Fetch prebuilt Torch
run: |
set -x -e
pushd scripts
wget https://github.com/MrCyjaneK/torch_dart/releases/download/4f987d4-1-ge071fcf-1-gc282f09-1-g4c290aa-1-gabdf653/torch_dart-4f987d4-1-ge071fcf-1-gc282f09-1-g4c290aa-1-gabdf653.tar.gz -O torch_dart.tar.gz
mkdir torch_dart
pushd torch_dart
tar -xzf ../torch_dart.tar.gz
popd
popd
- name: Execute Build and Setup Commands - name: Execute Build and Setup Commands
run: | run: |
pushd scripts/android pushd scripts/android
+11
View File
@@ -203,6 +203,17 @@ jobs:
ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/sources" "$PWD/wownero/contrib/depends/sources" ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/sources" "$PWD/wownero/contrib/depends/sources"
popd popd
- name: Fetch prebuilt Torch
run: |
set -x -e
pushd scripts
wget https://github.com/MrCyjaneK/torch_dart/releases/download/4f987d4-1-ge071fcf-1-gc282f09-1-g4c290aa-1-gabdf653/torch_dart-4f987d4-1-ge071fcf-1-gc282f09-1-g4c290aa-1-gabdf653.tar.gz -O torch_dart.tar.gz
mkdir torch_dart
pushd torch_dart
tar -xzf ../torch_dart.tar.gz
popd
popd
- name: Execute Build and Setup Commands - name: Execute Build and Setup Commands
run: | run: |
pushd scripts/linux pushd scripts/linux
+2
View File
@@ -228,3 +228,5 @@ flatpak-build/
**/linux/flutter/generated_plugin_registrant.cc **/linux/flutter/generated_plugin_registrant.cc
**/linux/flutter/generated_plugin_registrant.h **/linux/flutter/generated_plugin_registrant.h
**/linux/flutter/generated_plugins.cmake **/linux/flutter/generated_plugins.cmake
scripts/torch_dart/
+5 -7
View File
@@ -1061,15 +1061,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
tor_binary: torch_dart:
dependency: transitive dependency: transitive
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
+3 -3
View File
@@ -274,14 +274,14 @@ class Node extends HiveObject with Keyable {
} }
Future<bool> requestNodeWithProxy() async { Future<bool> requestNodeWithProxy() async {
if (!isValidProxyAddress && !CakeTor.instance.enabled) { if (!isValidProxyAddress && !CakeTor.instance!.enabled) {
return false; return false;
} }
String? proxy = socksProxyAddress; String? proxy = socksProxyAddress;
if ((proxy?.isEmpty ?? true) && CakeTor.instance.enabled) { if ((proxy?.isEmpty ?? true) && CakeTor.instance!.enabled) {
proxy = "${InternetAddress.loopbackIPv4.address}:${CakeTor.instance.port}"; proxy = "${InternetAddress.loopbackIPv4.address}:${CakeTor.instance!.port}";
} }
printV("proxy: $proxy"); printV("proxy: $proxy");
if (proxy == null) { if (proxy == null) {
+2 -2
View File
@@ -17,10 +17,10 @@ class ProxyAddress {
abstract class ProxySocket { abstract class ProxySocket {
static Future<ProxySocket> connect(bool sslEnabled, ProxyAddress address, {Duration? connectionTimeout}) async { static Future<ProxySocket> connect(bool sslEnabled, ProxyAddress address, {Duration? connectionTimeout}) async {
if (CakeTor.instance.started) { if (CakeTor.instance!.started) {
var socksSocket = await SOCKSSocket.create( var socksSocket = await SOCKSSocket.create(
proxyHost: InternetAddress.loopbackIPv4.address, proxyHost: InternetAddress.loopbackIPv4.address,
proxyPort: CakeTor.instance.port, proxyPort: CakeTor.instance!.port,
sslEnabled: sslEnabled, sslEnabled: sslEnabled,
); );
await socksSocket.connect(); await socksSocket.connect();
+11 -13
View File
@@ -5,8 +5,6 @@ import 'dart:typed_data';
import 'package:cw_core/utils/proxy_logger/abstract.dart'; import 'package:cw_core/utils/proxy_logger/abstract.dart';
import 'package:cw_core/utils/proxy_socket/abstract.dart'; import 'package:cw_core/utils/proxy_socket/abstract.dart';
import 'package:cw_core/utils/tor/abstract.dart'; import 'package:cw_core/utils/tor/abstract.dart';
import 'package:cw_core/utils/tor/android.dart';
import 'package:cw_core/utils/tor/disabled.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:socks5_proxy/socks_client.dart'; import 'package:socks5_proxy/socks_client.dart';
import 'package:http/io_client.dart' as ioc; import 'package:http/io_client.dart' as ioc;
@@ -37,7 +35,7 @@ class ProxyWrapper {
} }
RequestNetwork requestNetwork() { RequestNetwork requestNetwork() {
return CakeTor.instance.started ? RequestNetwork.tor : RequestNetwork.clearnet; return CakeTor.instance!.started ? RequestNetwork.tor : RequestNetwork.clearnet;
} }
ioc.IOClient getHttpIOClient({int? portOverride, bool internal = false}) { ioc.IOClient getHttpIOClient({int? portOverride, bool internal = false}) {
@@ -56,7 +54,7 @@ class ProxyWrapper {
return ioc.IOClient(httpClient); return ioc.IOClient(httpClient);
} }
int getPort() => CakeTor.instance.port; int getPort() => CakeTor.instance!.port;
@Deprecated('Use ProxyWrapper().get/post/put methods instead, and provide proper clearnet and onion uri.') @Deprecated('Use ProxyWrapper().get/post/put methods instead, and provide proper clearnet and onion uri.')
HttpClient getHttpClient({int? portOverride, bool internal = false}) { HttpClient getHttpClient({int? portOverride, bool internal = false}) {
@@ -70,13 +68,13 @@ class ProxyWrapper {
error: null error: null
); );
} }
if (CakeTor.instance.started) { if (CakeTor.instance!.started) {
// Assign connection factory. // Assign connection factory.
final client = HttpClient(); final client = HttpClient();
SocksTCPClient.assignToHttpClient(client, [ SocksTCPClient.assignToHttpClient(client, [
ProxySettings( ProxySettings(
InternetAddress.loopbackIPv4, InternetAddress.loopbackIPv4,
CakeTor.instance.port, CakeTor.instance!.port,
password: null, password: null,
), ),
]); ]);
@@ -154,9 +152,9 @@ class ProxyWrapper {
Uri? onionUri, Uri? onionUri,
}) async { }) async {
ioc.IOClient? torClient; ioc.IOClient? torClient;
bool torEnabled = CakeTor.instance.started; bool torEnabled = CakeTor.instance!.started;
if (CakeTor.instance.started) { if (CakeTor.instance!.started) {
torEnabled = true; torEnabled = true;
} else { } else {
torEnabled = false; torEnabled = false;
@@ -238,7 +236,7 @@ class ProxyWrapper {
ioc.IOClient clearnetClient = ioc.IOClient(cleatnetHttpClient); ioc.IOClient clearnetClient = ioc.IOClient(cleatnetHttpClient);
bool torEnabled = CakeTor.instance.started; bool torEnabled = CakeTor.instance!.started;
if (torEnabled) { if (torEnabled) {
try { try {
@@ -309,7 +307,7 @@ class ProxyWrapper {
String? body, String? body,
}) async { }) async {
ioc.IOClient? torClient; ioc.IOClient? torClient;
bool torEnabled = CakeTor.instance.started; bool torEnabled = CakeTor.instance!.started;
if (torEnabled) { if (torEnabled) {
try { try {
@@ -375,9 +373,9 @@ class ProxyWrapper {
Uri? onionUri, Uri? onionUri,
}) async { }) async {
ioc.IOClient? torClient; ioc.IOClient? torClient;
bool torEnabled = CakeTor.instance.started; bool torEnabled = CakeTor.instance!.started;
if (CakeTor.instance.started) { if (CakeTor.instance!.started) {
torEnabled = true; torEnabled = true;
} else { } else {
torEnabled = false; torEnabled = false;
@@ -443,5 +441,5 @@ class ProxyWrapper {
class CakeTor { class CakeTor {
static final CakeTorInstance instance = CakeTorInstance.getInstance(); static CakeTorInstance? instance;
} }
+10 -5
View File
@@ -1,9 +1,9 @@
import 'dart:io'; import 'dart:io';
import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/utils/tor/android.dart';
import 'package:cw_core/utils/tor/disabled.dart'; import 'package:cw_core/utils/tor/disabled.dart';
import 'package:cw_core/utils/tor/socks.dart'; import 'package:cw_core/utils/tor/socks.dart';
import 'package:cw_core/utils/tor/torch.dart';
abstract class CakeTorInstance { abstract class CakeTorInstance {
bool get started; bool get started;
@@ -17,10 +17,7 @@ abstract class CakeTorInstance {
Future<void> start(); Future<void> start();
Future<void> stop(); Future<void> stop();
static CakeTorInstance getInstance() { static Future<CakeTorInstance> getInstance() async {
if (Platform.isAndroid) {
return CakeTorAndroid();
}
if (Platform.isLinux) { if (Platform.isLinux) {
try { try {
String? socksServer; String? socksServer;
@@ -46,6 +43,14 @@ abstract class CakeTorInstance {
printV("Failed to identify linux version - /etc/os-release missing"); printV("Failed to identify linux version - /etc/os-release missing");
} }
} }
try {
final torch = await CakeTorTorch.getInstance();
if (torch != null) {
return torch;
}
} catch (e) {
printV("Failed to initialize torch: $e");
}
return CakeTorDisabled(); return CakeTorDisabled();
} }
@@ -1,18 +1,32 @@
import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'dart:isolate';
import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/utils/tor/abstract.dart'; import 'package:cw_core/utils/tor/abstract.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
import 'package:tor_binary/tor_binary_platform_interface.dart'; import 'package:torch_dart/abstract_tor.dart';
class CakeTorAndroid implements CakeTorInstance { class CakeTorTorch implements CakeTorInstance {
@override final List<Tor> _torList;
bool get bootstrapped => _proc != null;
CakeTorTorch(this._torList);
static Future<CakeTorTorch?> getInstance() async {
final list = await Tor.getTorList();
if (list.isEmpty) {
return null;
}
return CakeTorTorch(list);
}
@override @override
bool get enabled => _proc != null; bool get bootstrapped => isTorRunning;
@override
bool get enabled => isTorRunning;
@override @override
int get port => 42142; int get port => 42142;
@@ -23,63 +37,54 @@ class CakeTorAndroid implements CakeTorInstance {
} }
@override @override
bool get started => _proc != null; bool started = false;
static bool isTorRunning = false;
@override @override
Future<void> stop() async { Future<void> stop() async {
_proc?.kill(); started = false;
await _proc?.exitCode;
_proc = null;
} }
static Process? _proc;
Future<void> _runEmbeddedTor() async { Future<void> _runEmbeddedTor() async {
final dir = await getApplicationCacheDirectory(); final dir = await getApplicationCacheDirectory();
final torBinPath = p.join((await TorBinaryPlatform.instance.getBinaryPath())!, "libtor.so"); final torList = await Tor.getTorList();
printV("torPath: $torBinPath"); printV("tor version: ${torList.first.version}");
if (started) { if (isTorRunning) {
started = true;
printV("Proxy is running"); printV("Proxy is running");
return; return;
} }
isTorRunning = true;
started = true;
printV("Starting embedded tor"); printV("Starting embedded tor");
printV("app docs: $dir"); printV("app docs: $dir");
final torrc = """ final torrc = """
SocksPort $port SocksPort $port
Log notice file ${p.join(dir.path, "tor.log")} Log notice stdout
RunAsDaemon 0 RunAsDaemon 0
DataDirectory ${p.join(dir.path, "tor-data")} DataDirectory ${p.join(dir.path, "tor-data")}
"""; """;
final torrcPath = p.join(dir.absolute.path, "torrc"); final torrcPath = p.join(dir.absolute.path, "torrc");
File(torrcPath).writeAsStringSync(torrc); File(torrcPath).writeAsStringSync(torrc);
if (_proc != null) { final tor = _torList.first;
try { tor.start(["nonexistent", "-f", torrcPath]);
_proc?.kill();
await _proc?.exitCode;
_proc = null;
} catch (e) {
printV(e);
}
}
printV("path: $torBinPath -f $torrcPath");
_proc = await Process.start(torBinPath, ["-f", torrcPath]);
_proc?.stdout.transform(utf8.decoder).forEach(printV);
_proc?.stderr.transform(utf8.decoder).forEach(printV);
} }
@override @override
String toString() { String toString() {
return """ return """
CakeTorAndroid( CakeTorTorch(
port: $port, port: $port,
started: $started, started: $started,
bootstrapped: $bootstrapped, bootstrapped: $bootstrapped,
enabled: $enabled, enabled: $enabled,
proc: $_proc, torList:
- ${_torList.map((e) => e.version).join(",\n - ")}
) )
"""; """;
} }
+6 -8
View File
@@ -730,15 +730,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
tor_binary: torch_dart:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@@ -828,5 +826,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.6.0 <4.0.0" dart: ">=3.6.2 <4.0.0"
flutter: ">=3.27.0" flutter: ">=3.27.0"
+2 -4
View File
@@ -38,10 +38,8 @@ dependencies:
git: git:
url: https://github.com/sneurlax/socks_socket url: https://github.com/sneurlax/socks_socket
ref: e6232c53c1595469931ababa878759a067c02e94 ref: e6232c53c1595469931ababa878759a067c02e94
tor_binary: torch_dart:
git: path: ../scripts/torch_dart
url: https://github.com/MrCyjaneK/flutter-tor_binary
ref: cb811c610871a9517d47134b87c2f590c15c96c5
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
+6 -8
View File
@@ -761,15 +761,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
tor_binary: torch_dart:
dependency: transitive dependency: transitive
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@@ -867,5 +865,5 @@ packages:
source: hosted source: hosted
version: "2.2.2" version: "2.2.2"
sdks: sdks:
dart: ">=3.6.0 <4.0.0" dart: ">=3.6.2 <4.0.0"
flutter: ">=3.24.0" flutter: ">=3.24.0"
+6 -6
View File
@@ -229,12 +229,12 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
@override @override
Future<void> connectToNode({required Node node}) async { Future<void> connectToNode({required Node node}) async {
String socksProxy = node.socksProxyAddress ?? ''; String socksProxy = node.socksProxyAddress ?? '';
printV("bootstrapped: ${CakeTor.instance.bootstrapped}"); printV("bootstrapped: ${CakeTor.instance!.bootstrapped}");
printV(" enabled: ${CakeTor.instance.enabled}"); printV(" enabled: ${CakeTor.instance!.enabled}");
printV(" port: ${CakeTor.instance.port}"); printV(" port: ${CakeTor.instance!.port}");
printV(" started: ${CakeTor.instance.started}"); printV(" started: ${CakeTor.instance!.started}");
if (CakeTor.instance.enabled) { if (CakeTor.instance!.enabled) {
socksProxy = "127.0.0.1:${CakeTor.instance.port}"; socksProxy = "127.0.0.1:${CakeTor.instance!.port}";
} }
try { try {
syncStatus = ConnectingSyncStatus(); syncStatus = ConnectingSyncStatus();
+6 -8
View File
@@ -874,15 +874,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
tor_binary: torch_dart:
dependency: transitive dependency: transitive
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@@ -996,5 +994,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.6.0 <4.0.0" dart: ">=3.6.2 <4.0.0"
flutter: ">=3.24.0" flutter: ">=3.24.0"
+6 -8
View File
@@ -879,15 +879,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
tor_binary: torch_dart:
dependency: transitive dependency: transitive
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@@ -977,5 +975,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.6.0 <4.0.0" dart: ">=3.6.2 <4.0.0"
flutter: ">=3.27.0" flutter: ">=3.27.0"
+6 -6
View File
@@ -203,12 +203,12 @@ abstract class WowneroWalletBase
@override @override
Future<void> connectToNode({required Node node}) async { Future<void> connectToNode({required Node node}) async {
String socksProxy = node.socksProxyAddress ?? ''; String socksProxy = node.socksProxyAddress ?? '';
printV("bootstrapped: ${CakeTor.instance.bootstrapped}"); printV("bootstrapped: ${CakeTor.instance!.bootstrapped}");
printV(" enabled: ${CakeTor.instance.enabled}"); printV(" enabled: ${CakeTor.instance!.enabled}");
printV(" port: ${CakeTor.instance.port}"); printV(" port: ${CakeTor.instance!.port}");
printV(" started: ${CakeTor.instance.started}"); printV(" started: ${CakeTor.instance!.started}");
if (CakeTor.instance.enabled) { if (CakeTor.instance!.enabled) {
socksProxy = "127.0.0.1:${CakeTor.instance.port}"; socksProxy = "127.0.0.1:${CakeTor.instance!.port}";
} }
try { try {
syncStatus = ConnectingSyncStatus(); syncStatus = ConnectingSyncStatus();
+6 -8
View File
@@ -778,15 +778,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
tor_binary: torch_dart:
dependency: transitive dependency: transitive
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@@ -876,5 +874,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.6.0 <4.0.0" dart: ">=3.6.2 <4.0.0"
flutter: ">=3.24.0" flutter: ">=3.24.0"
+6 -8
View File
@@ -775,15 +775,13 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
tor_binary: torch_dart:
dependency: transitive dependency: transitive
description: description:
path: "." path: "../scripts/torch_dart"
ref: cb811c610871a9517d47134b87c2f590c15c96c5 relative: true
resolved-ref: cb811c610871a9517d47134b87c2f590c15c96c5 source: path
url: "https://github.com/MrCyjaneK/flutter-tor_binary" version: "0.0.1"
source: git
version: "4.7.14"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@@ -873,5 +871,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.6.0 <4.0.0" dart: ">=3.6.2 <4.0.0"
flutter: ">=3.24.0" flutter: ">=3.24.0"
+1
View File
@@ -22,6 +22,7 @@ cd cake_wallet
docker run -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:debian12-flutter3.27.4-ndkr28-go1.24.1-ruststablenightly bash -x << EOF docker run -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:debian12-flutter3.27.4-ndkr28-go1.24.1-ruststablenightly bash -x << EOF
set -x -e set -x -e
pushd scripts/android pushd scripts/android
./build_torch.sh
source ./app_env.sh cakewallet source ./app_env.sh cakewallet
# source ./app_env.sh monero.com # Uncomment this line to build monero.com # source ./app_env.sh monero.com # Uncomment this line to build monero.com
./app_config.sh ./app_config.sh
+45 -28
View File
@@ -43,6 +43,7 @@ PODS:
- DKPhotoGallery/Resource (0.0.19): - DKPhotoGallery/Resource (0.0.19):
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- dnssec_proof (0.0.1)
- fast_scanner (5.1.1): - fast_scanner (5.1.1):
- Flutter - Flutter
- file_picker (0.0.1): - file_picker (0.0.1):
@@ -66,6 +67,8 @@ PODS:
- Flutter - Flutter
- fluttertoast (0.0.2): - fluttertoast (0.0.2):
- Flutter - Flutter
- image_picker_ios (0.0.1):
- Flutter
- in_app_review (2.0.0): - in_app_review (2.0.0):
- Flutter - Flutter
- integration_test (0.0.1): - integration_test (0.0.1):
@@ -95,6 +98,8 @@ PODS:
- sp_scanner (0.0.1): - sp_scanner (0.0.1):
- Flutter - Flutter
- SwiftyGif (5.4.5) - SwiftyGif (5.4.5)
- torch_dart (0.0.1):
- Flutter
- uni_links (0.0.1): - uni_links (0.0.1):
- Flutter - Flutter
- universal_ble (0.0.1): - universal_ble (0.0.1):
@@ -114,6 +119,7 @@ DEPENDENCIES:
- device_display_brightness (from `.symlinks/plugins/device_display_brightness/ios`) - device_display_brightness (from `.symlinks/plugins/device_display_brightness/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- devicelocale (from `.symlinks/plugins/devicelocale/ios`) - devicelocale (from `.symlinks/plugins/devicelocale/ios`)
- dnssec_proof (from `.symlinks/plugins/dnssec_proof/ios`)
- fast_scanner (from `.symlinks/plugins/fast_scanner/ios`) - fast_scanner (from `.symlinks/plugins/fast_scanner/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
@@ -123,6 +129,7 @@ DEPENDENCIES:
- flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`) - flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- in_app_review (from `.symlinks/plugins/in_app_review/ios`) - in_app_review (from `.symlinks/plugins/in_app_review/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`) - integration_test (from `.symlinks/plugins/integration_test/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
@@ -134,6 +141,7 @@ DEPENDENCIES:
- share_plus (from `.symlinks/plugins/share_plus/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sp_scanner (from `.symlinks/plugins/sp_scanner/ios`) - sp_scanner (from `.symlinks/plugins/sp_scanner/ios`)
- torch_dart (from `.symlinks/plugins/torch_dart/ios`)
- uni_links (from `.symlinks/plugins/uni_links/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`)
- universal_ble (from `.symlinks/plugins/universal_ble/darwin`) - universal_ble (from `.symlinks/plugins/universal_ble/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -162,6 +170,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/device_info_plus/ios" :path: ".symlinks/plugins/device_info_plus/ios"
devicelocale: devicelocale:
:path: ".symlinks/plugins/devicelocale/ios" :path: ".symlinks/plugins/devicelocale/ios"
dnssec_proof:
:path: ".symlinks/plugins/dnssec_proof/ios"
fast_scanner: fast_scanner:
:path: ".symlinks/plugins/fast_scanner/ios" :path: ".symlinks/plugins/fast_scanner/ios"
file_picker: file_picker:
@@ -180,6 +190,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_secure_storage/ios" :path: ".symlinks/plugins/flutter_secure_storage/ios"
fluttertoast: fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios" :path: ".symlinks/plugins/fluttertoast/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
in_app_review: in_app_review:
:path: ".symlinks/plugins/in_app_review/ios" :path: ".symlinks/plugins/in_app_review/ios"
integration_test: integration_test:
@@ -202,6 +214,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin" :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sp_scanner: sp_scanner:
:path: ".symlinks/plugins/sp_scanner/ios" :path: ".symlinks/plugins/sp_scanner/ios"
torch_dart:
:path: ".symlinks/plugins/torch_dart/ios"
uni_links: uni_links:
:path: ".symlinks/plugins/uni_links/ios" :path: ".symlinks/plugins/uni_links/ios"
universal_ble: universal_ble:
@@ -212,42 +226,45 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/wakelock_plus/ios" :path: ".symlinks/plugins/wakelock_plus/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90 CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90
cw_decred: 9c0e1df74745b51a1289ec5e91fb9e24b68fa14a cw_decred: a02cf30175a46971c1e2fa22c48407534541edc6
cw_mweb: 22cd01dfb8ad2d39b15332006f22046aaa8352a3 cw_mweb: 3aea2fb35b2bd04d8b2d21b83216f3b8fb768d85
device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_display_brightness: 04374ebd653619292c1d996f00f42877ea19f17f
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 device_info_plus: 335f3ce08d2e174b9fdc3db3db0f4e3b1f66bd89
devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926 devicelocale: bd64aa714485a8afdaded0892c1e7d5b7f680cf8
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60 DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
fast_scanner: 44c00940355a51258cd6c2085734193cd23d95bc dnssec_proof: d461cac7bd3301eb7447f87936745a0c1ae0a67e
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655 fast_scanner: 2cb1ad3e69e645e9980fb4961396ce5804caa3e3
file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
flutter_local_authentication: 1172a4dd88f6306dadce067454e2c4caf07977bb flutter_local_authentication: 989278c681612f1ee0e36019e149137f114b9d7f
flutter_local_notifications: ff50f8405aaa0ccdc7dcfb9022ca192e8ad9688f flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83 flutter_mailer: 3a8cd4f36c960fb04528d5471097270c19fec1c4
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be flutter_secure_storage: 2c2ff13db9e0a5647389bff88b0ecac56e3f3418
fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
in_app_review: a31b5257259646ea78e0e35fc914979b0031d011 image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 in_app_review: 5596fe56fab799e8edb3561c03d053363ab13457
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
payjoin_flutter: d9d4c8aa16bd5dfedb9b21d0edc8199e0187d96e payjoin_flutter: d9d4c8aa16bd5dfedb9b21d0edc8199e0187d96e
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
reown_yttrium: c0e87e5965fa60a3559564cc35cffbba22976089 reown_yttrium: cee334ade64725b1d83f7b34c706a6aae2696d58
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8 SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 sensitive_clipboard: 161e9abc3d56b3131309d8a321eb4690a803c16b
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sp_scanner: eaa617fa827396b967116b7f1f43549ca62e9a12 sp_scanner: b1bc9321690980bdb44bba7ec85d5543e716d1b5
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a torch_dart: f4620705d10f05492fab047f2fa1c3a600e7d17d
universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6 uni_links: ed8c961e47ed9ce42b6d91e1de8049e38a4b3152
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe universal_ble: ff19787898040d721109c6324472e5dd4bc86adc
wakelock_plus: 76957ab028e12bfa4e66813c99e46637f367fc7e url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
YttriumWrapper: 31e937fe9fbe0f1314d2ca6be9ce9b379a059966 YttriumWrapper: 31e937fe9fbe0f1314d2ca6be9ce9b379a059966
PODFILE CHECKSUM: 5296465b1c6d14d506230356756826012f65d97a PODFILE CHECKSUM: 5296465b1c6d14d506230356756826012f65d97a
+6
View File
@@ -47,6 +47,7 @@ import 'package:cw_core/unspent_coins_info.dart';
import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/utils/proxy_logger/memory_proxy_logger.dart'; import 'package:cw_core/utils/proxy_logger/memory_proxy_logger.dart';
import 'package:cw_core/utils/proxy_wrapper.dart'; import 'package:cw_core/utils/proxy_wrapper.dart';
import 'package:cw_core/utils/tor/abstract.dart';
import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_info.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@@ -85,6 +86,11 @@ Future<void> runAppWithZone({Key? topLevelKey}) async {
return true; return true;
}; };
await FlutterDaemon().unmarkBackgroundSync(); await FlutterDaemon().unmarkBackgroundSync();
try {
CakeTor.instance = await CakeTorInstance.getInstance();
} catch (e) {
printV("Failed to initialize tor: $e");
}
await initializeAppAtRoot(); await initializeAppAtRoot();
if (kDebugMode) { if (kDebugMode) {
@@ -155,7 +155,7 @@ class WCCDetailsWidget extends BasePage {
backgroundImage: (pairing.peerMetadata!.icons.isNotEmpty backgroundImage: (pairing.peerMetadata!.icons.isNotEmpty
? NetworkImage(pairing.peerMetadata!.icons[0]) ? NetworkImage(pairing.peerMetadata!.icons[0])
: AssetImage( : AssetImage(
CakeTor.instance.enabled CakeTor.instance!.enabled
? 'assets/images/tor_logo.svg' ? 'assets/images/tor_logo.svg'
: 'assets/images/app_logo.png')) as ImageProvider<Object>, : 'assets/images/app_logo.png')) as ImageProvider<Object>,
), ),
+1 -1
View File
@@ -267,7 +267,7 @@ class Badge extends StatelessWidget {
Widget getImage(String imagePath, {double? height, double? width, Color? imageColor}) { Widget getImage(String imagePath, {double? height, double? width, Color? imageColor}) {
bool isNetworkImage = imagePath.startsWith('http') || imagePath.startsWith('https'); bool isNetworkImage = imagePath.startsWith('http') || imagePath.startsWith('https');
if (CakeTor.instance.enabled && isNetworkImage) { if (CakeTor.instance!.enabled && isNetworkImage) {
imagePath = "assets/images/tor_logo.svg"; imagePath = "assets/images/tor_logo.svg";
isNetworkImage = false; isNetworkImage = false;
} }
+1 -1
View File
@@ -8,7 +8,7 @@ class FeatureFlag {
static const bool isCakePayRedemptionFlowEnabled = false; static const bool isCakePayRedemptionFlowEnabled = false;
static const bool isExolixEnabled = true; static const bool isExolixEnabled = true;
static const bool isBackgroundSyncEnabled = true; static const bool isBackgroundSyncEnabled = true;
static final bool isInAppTorEnabled = CakeTor.instance is! CakeTorDisabled; static bool get isInAppTorEnabled => CakeTor.instance is! CakeTorDisabled;
static const int verificationWordsCount = kDebugMode ? 0 : 2; static const int verificationWordsCount = kDebugMode ? 0 : 2;
static const bool hasDevOptions = bool.fromEnvironment('hasDevOptions', defaultValue: kDebugMode); static const bool hasDevOptions = bool.fromEnvironment('hasDevOptions', defaultValue: kDebugMode);
static const bool hasBitcoinViewOnly = true; static const bool hasBitcoinViewOnly = true;
+1 -1
View File
@@ -13,7 +13,7 @@ class ImageUtil {
}) { }) {
bool isNetworkImage = imagePath.startsWith('http') || imagePath.startsWith('https'); bool isNetworkImage = imagePath.startsWith('http') || imagePath.startsWith('https');
if (CakeTor.instance.enabled && isNetworkImage) { if (CakeTor.instance!.enabled && isNetworkImage) {
imagePath = "assets/images/tor_logo.svg"; imagePath = "assets/images/tor_logo.svg";
isNetworkImage = false; isNetworkImage = false;
} }
+6 -6
View File
@@ -15,7 +15,7 @@ Future<void> ensureTorStopped({required BuildContext? context}) async {
if (context != null) dialogContext = await showFullscreenDialog(context); if (context != null) dialogContext = await showFullscreenDialog(context);
didTorStart = false; didTorStart = false;
printV("Stopping tor"); printV("Stopping tor");
await CakeTor.instance.stop(); await CakeTor.instance!.stop();
printV("Tor stopped"); printV("Tor stopped");
if (context != null) dismissFullscreenDialog(dialogContext!); if (context != null) dismissFullscreenDialog(dialogContext!);
} }
@@ -32,20 +32,20 @@ Future<void> ensureTorStarted({required BuildContext? context}) async {
// var rootToken = RootIsolateToken.instance!; // var rootToken = RootIsolateToken.instance!;
// await Isolate.run(() async { // await Isolate.run(() async {
// BackgroundIsolateBinaryMessenger.ensureInitialized(rootToken); // BackgroundIsolateBinaryMessenger.ensureInitialized(rootToken);
// await CakeTor.instance.start(); // await CakeTor.instance!.start();
// }); // });
// second start is fast but populates the values on current thread // second start is fast but populates the values on current thread
await CakeTor.instance.start(); await CakeTor.instance!.start();
printV("Tor started"); printV("Tor started");
while (!CakeTor.instance.started) { while (!CakeTor.instance!.started) {
printV("Waiting for tor to start (part 1)"); printV("Waiting for tor to start (part 1)");
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 1));
} }
while (CakeTor.instance.port == -1) { while (CakeTor.instance!.port == -1) {
printV("Waiting for tor to start (listening on port)"); printV("Waiting for tor to start (listening on port)");
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 1));
} }
printV("Tor started on port ${CakeTor.instance.port}"); printV("Tor started on port ${CakeTor.instance!.port}");
if (context != null) dismissFullscreenDialog(dialogContext!); if (context != null) dismissFullscreenDialog(dialogContext!);
} }
@@ -399,7 +399,7 @@ abstract class DashboardViewModelBase with Store {
String get address => wallet.walletAddresses.address; String get address => wallet.walletAddresses.address;
@computed @computed
bool get isTorEnabled => CakeTor.instance.enabled; bool get isTorEnabled => CakeTor.instance!.enabled;
@computed @computed
SyncStatus get status => wallet.syncStatus; SyncStatus get status => wallet.syncStatus;
@@ -64,7 +64,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
bool useSocksProxy; bool useSocksProxy;
@computed @computed
bool get usesEmbeddedProxy => CakeTor.instance.started; bool get usesEmbeddedProxy => CakeTor.instance!.started;
@observable @observable
String socksProxyAddress; String socksProxyAddress;
@@ -39,7 +39,7 @@ abstract class NodeListViewModelBase with Store {
String getAlertContent(String uri) => String getAlertContent(String uri) =>
S.current.change_current_node(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 @computed
bool get enableAutomaticNodeSwitching => settingsStore.enableAutomaticNodeSwitching; bool get enableAutomaticNodeSwitching => settingsStore.enableAutomaticNodeSwitching;
@@ -39,7 +39,7 @@ abstract class PowNodeListViewModelBase with Store {
String getAlertContent(String uri) => String getAlertContent(String uri) =>
S.current.change_current_node(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 @computed
bool get enableAutomaticNodeSwitching => settingsStore.enableAutomaticNodeSwitching; bool get enableAutomaticNodeSwitching => settingsStore.enableAutomaticNodeSwitching;
+1 -1
View File
@@ -59,7 +59,7 @@ abstract class StartTorViewModelBase with Store {
await ensureTorStarted(context: null); await ensureTorStarted(context: null);
while (true) { while (true) {
await Future.delayed(Duration(milliseconds: 250)); await Future.delayed(Duration(milliseconds: 250));
if (CakeTor.instance.port != -1 && CakeTor.instance.started) { if (CakeTor.instance!.port != -1 && CakeTor.instance!.started) {
break; break;
} }
} }
+25 -19
View File
@@ -37,6 +37,8 @@ PODS:
- FlutterMacOS - FlutterMacOS
- sp_scanner (0.0.1): - sp_scanner (0.0.1):
- FlutterMacOS - FlutterMacOS
- torch_dart (0.0.1):
- FlutterMacOS
- universal_ble (0.0.1): - universal_ble (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
@@ -64,6 +66,7 @@ DEPENDENCIES:
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- sp_scanner (from `Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos`) - sp_scanner (from `Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos`)
- torch_dart (from `Flutter/ephemeral/.symlinks/plugins/torch_dart/macos`)
- universal_ble (from `Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin`) - universal_ble (from `Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`) - wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
@@ -109,6 +112,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
sp_scanner: sp_scanner:
:path: Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos :path: Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos
torch_dart:
:path: Flutter/ephemeral/.symlinks/plugins/torch_dart/macos
universal_ble: universal_ble:
:path: Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin :path: Flutter/ephemeral/.symlinks/plugins/universal_ble/darwin
url_launcher_macos: url_launcher_macos:
@@ -117,28 +122,29 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos :path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
SPEC CHECKSUMS: SPEC CHECKSUMS:
connectivity_plus: 0a976dfd033b59192912fa3c6c7b54aab5093802 connectivity_plus: 4adf20a405e25b42b9c9f87feff8f4b6fde18a4e
cw_mweb: 7440b12ead811dda972a9918442ea2a458e8742c cw_mweb: 4746a3b5cc5bd4afe6fadd2481c4f7b239e391d0
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f device_info_plus: b0fafc687fb901e2af612763340f1b0d4352f8e5
devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 devicelocale: 456a07c045d3113938aa4983065bd8526e2af792
dnssec_proof: d461cac7bd3301eb7447f87936745a0c1ae0a67e dnssec_proof: d461cac7bd3301eb7447f87936745a0c1ae0a67e
fast_scanner: d31bae07e2653403a69dac99fb710c1722b16a97 fast_scanner: a4ead8e56f185cd565e25250fdb97fa669ea1d2e
file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d file_selector_macos: 6280b52b459ae6c590af5d78fc35c7267a3c4b31
flutter_inappwebview_macos: bdf207b8f4ebd58e86ae06cd96b147de99a67c9b flutter_inappwebview_macos: c2d68649f9f8f1831bfcd98d73fd6256366d9d1d
flutter_local_authentication: 85674893931e1c9cfa7c9e4f5973cb8c56b018b0 flutter_local_authentication: 2f9a2682f498abcc12d7e9729b5007a947170fdc
flutter_local_notifications: 4ccab5b7a22835214a6672e3f9c5e8ae207dab36 flutter_local_notifications: 4bf37a31afde695b56091b4ae3e4d9c7a7e6cda0
flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea flutter_secure_storage_macos: 3dacac420d84c4d0dc5e868194ee43c8664ec797
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
in_app_review: a6a031b9acd03c7d103e341aa334adf2c493fb93 in_app_review: 0599bccaed5e02f6bed2b0d30d16f86b63ed8638
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b package_info_plus: f0052d280d17aa382b932f399edf32507174e870
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
share_plus: 1fa619de8392a4398bfaf176d441853922614e89 share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sp_scanner: 269d96e0ec3173e69156be7239b95182be3b8303 sp_scanner: d9316427b628dd86d6e9e3c5d42ed6b4b410157c
universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6 torch_dart: 7e4f682c34ee0d967a35977102590094a7510c90
url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 universal_ble: ff19787898040d721109c6324472e5dd4bc86adc
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269 url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
wakelock_plus: 21ddc249ac4b8d018838dbdabd65c5976c308497
PODFILE CHECKSUM: 65ec1541137fb5b35d00490dec1bb48d4d9586bb PODFILE CHECKSUM: 65ec1541137fb5b35d00490dec1bb48d4d9586bb
+2 -4
View File
@@ -143,6 +143,8 @@ dependencies:
git: git:
url: https://github.com/MrCyjaneK/dnssec_proof.git url: https://github.com/MrCyjaneK/dnssec_proof.git
ref: a2b0bdac343afc14fc38dfb81f28147eab50be05 ref: a2b0bdac343afc14fc38dfb81f28147eab50be05
torch_dart:
path: ./scripts/torch_dart
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
@@ -188,10 +190,6 @@ dependency_overrides:
git: git:
url: https://github.com/LacticWhale/socks_dart.git url: https://github.com/LacticWhale/socks_dart.git
ref: 27ad7c2efae8d7460325c74b90f660085cbd0685 ref: 27ad7c2efae8d7460325c74b90f660085cbd0685
tor_binary:
git:
url: https://github.com/MrCyjaneK/flutter-tor_binary
ref: cb811c610871a9517d47134b87c2f590c15c96c5
web_socket_channel: ^3.0.2 web_socket_channel: ^3.0.2
freezed_annotation: 2.4.4 freezed_annotation: 2.4.4
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh" source "$(cd "$(dirname "${BASH_SOURCE[0]}")/scripts" && pwd)/functions.sh"
# Get the current git branch # Get the current git branch
get_current_branch() { get_current_branch() {
if git rev-parse --git-dir > /dev/null 2>&1; then if git rev-parse --git-dir > /dev/null 2>&1; then
+2
View File
@@ -7,6 +7,8 @@ fi
DIR=$(dirname "$0") DIR=$(dirname "$0")
$DIR/build_torch.sh
case $APP_ANDROID_TYPE in case $APP_ANDROID_TYPE in
"monero.com") $DIR/build_monero_all.sh ;; "monero.com") $DIR/build_monero_all.sh ;;
"cakewallet") $DIR/build_monero_all.sh "cakewallet") $DIR/build_monero_all.sh
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
set -x -e
cd "$(dirname "$0")"
../prepare_torch.sh
cd ../torch_dart
./build.sh aarch64-linux-android armv7a-linux-androideabi x86_64-linux-android
+2
View File
@@ -7,6 +7,8 @@ fi
DIR=$(dirname "$0") DIR=$(dirname "$0")
$DIR/build_torch.sh
case $APP_IOS_TYPE in case $APP_IOS_TYPE in
"monero.com") $DIR/build_monero_all.sh ;; "monero.com") $DIR/build_monero_all.sh ;;
"cakewallet") $DIR/build_monero_all.sh && $DIR/build_mwebd.sh && $DIR/build_decred.sh ;; "cakewallet") $DIR/build_monero_all.sh && $DIR/build_mwebd.sh && $DIR/build_decred.sh ;;
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
set -x -e
cd "$(dirname "$0")"
../prepare_torch.sh
cd ../torch_dart
# Need to build all platforms to get .xcframework
./build.sh aarch64-apple-ios-simulator aarch64-apple-ios aarch64-apple-darwin x86_64-apple-darwin
+3 -1
View File
@@ -1,3 +1,5 @@
#!/bin/sh #!/bin/sh
./build_monero_all.sh universal && $DIR/build_decred.sh ./build_torch.sh
./build_monero_all.sh universal && ./build_decred.sh
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
set -x -e
cd "$(dirname "$0")"
exec bash ../ios/build_torch.sh
+1
View File
@@ -6,6 +6,7 @@ cd "$(dirname "$0")"
if [[ ! -d "monero_c/.git" ]]; if [[ ! -d "monero_c/.git" ]];
then then
rm -rf monero_c
git clone https://github.com/mrcyjanek/monero_c --branch master monero_c git clone https://github.com/mrcyjanek/monero_c --branch master monero_c
cd monero_c cd monero_c
git checkout b576312e4d466569cd03482b61c597b39a9f4dc3 git checkout b576312e4d466569cd03482b61c597b39a9f4dc3
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -x -e
cd "$(dirname "$0")"
# IMPORTANT: Make sure to update action 'Build Torch` in
# - .github/workflows/pr_test_build_android.yml
# - .github/workflows/pr_test_build_linux.yml
# https://github.com/MrCyjaneK/torch_dart/releases/download/4f987d4-1-ge071fcf-1-gc282f09-1-g4c290aa-1-gabdf653/torch_dart-4f987d4-1-ge071fcf-1-gc282f09-1-g4c290aa-1-gabdf653.tar.gz
HASH=abdf653fc15b576f2a67597a1f9618345a297f45
if [[ ! -d "torch_dart/.git" ]];
then
rm -rf torch_dart
git clone https://github.com/mrcyjanek/torch_dart
cd torch_dart
else
cd torch_dart
git fetch -a
fi
git reset --hard
git checkout $HASH
git reset --hard
# recommended to uncomment during development
# sed -i.bak 's/go run . -cleanup/#go run . -cleanup/g' build.sh