Mark Nano, Banano and Fact0rn as Tor-ready, proxy Stellar node test
What changed, and why it matters
This commit fixes a privacy leak in the Stellar wallet connection test and marks three cryptocurrencies (Nano, Banano, and Fact0rn) as supporting Tor. Previously, when testing a Stellar node, the first request went through the Tor proxy, but a follow-up request to check the ledger height was sent directly over the regular internet, potentially exposing the user's IP address and the node they were connecting to. The commit also correctly notes that Nano, Banano, and Fact0rn already supported Tor routing in practice, so their flags were updated to reflect that.
Users relying on Tor for privacy with Stellar, Nano, Banano, or Fact0rn should update to a build containing this commit. Review whether the Stellar node test or similar connection tests in other currency integrations have any other unproxied follow-up requests.
Security signals we found
Privacy leak: Stellar node test sent follow-up ledger query directly instead of through Tor proxy
Tor support flag corrections for Nano, Banano, and Fact0rn
SOCKS5 proxy assignment to HttpClient for Stellar SDK
Conditional proxying based on AppFeature.tor and Prefs.instance.useTor
Evidence from the diff
The patch modifies three files. In test_stellar_node_connection.dart, the StellarSDK instance is now constructed with an optional httpClient that is configured to use the SOCKS5 proxy provided by the Tor service when the Tor feature is enabled. This ensures the ledger height query is also proxied. In fact0rn.dart, torSupport and torEnabled are set to true. In nano_currency.dart, torSupport is set to true for Nano and Banano, which already routed all requests through Tor. The core fix is the Stellar node test no longer leaking a direct HTTP request after an initial proxied request.
Changed components
lib/utilities/test_stellar_node_connection.dartlib/wallets/crypto_currency/coins/fact0rn.dartlib/wallets/crypto_currency/intermediate/nano_currency.dartInspect captured patch +16 / −3
### lib/utilities/test_stellar_node_connection.dart
@@ -1,5 +1,7 @@
import 'dart:convert';
+import 'dart:io';
+import 'package:socks5_proxy/socks.dart';
import 'package:stellar_flutter_sdk/stellar_flutter_sdk.dart';
import '../app_config.dart';
@@ -28,7 +30,15 @@ Future<bool> testStellarNodeConnection(String host, int port) async {
if (response.code == 200) {
//Get chain height for sdk
- final StellarSDK stellarSdk = StellarSDK(host);
+ HttpClient? httpClient;
+ if (AppConfig.hasFeature(AppFeature.tor) && Prefs.instance.useTor) {
+ final proxyInfo = TorService.sharedInstance.getProxyInfo();
+ httpClient = HttpClient();
+ SocksTCPClient.assignToHttpClient(httpClient, [
+ ProxySettings(proxyInfo.host, proxyInfo.port),
+ ]);
+ }
+ final StellarSDK stellarSdk = StellarSDK(host, httpClient: httpClient);
final height = await stellarSdk.ledgers
.order(RequestBuilderOrder.DESC)
.limit(1)
### lib/wallets/crypto_currency/coins/fact0rn.dart
@@ -48,7 +48,7 @@ class Fact0rn extends Bip39HDCurrency with ElectrumXCurrencyInterface {
String get ticker => _ticker;
@override
- bool get torSupport => false;
+ bool get torSupport => true;
@override
List<DerivePathType> get supportedDerivationPathTypes => [
@@ -184,7 +184,7 @@ class Fact0rn extends Bip39HDCurrency with ElectrumXCurrencyInterface {
coinName: identifier,
isFailover: true,
isDown: false,
- torEnabled: false,
+ torEnabled: true,
clearnetEnabled: true,
isPrimary: isPrimary,
);
### lib/wallets/crypto_currency/intermediate/nano_currency.dart
@@ -18,6 +18,9 @@ abstract class NanoCurrency extends Bip39Currency {
@override
bool get hasBuySupport => false;
+ @override
+ bool get torSupport => true;
+
@override
int get defaultSeedPhraseLength => 24;
Why this scored 48/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.