Skip to content

Commit 3cf7937

Browse files
committed
multi: use 127.0.0.1, not 0.0.0.0
1 parent c5fd12e commit 3cf7937

15 files changed

+29
-29
lines changed

bitwindow/lib/env.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Environment {
1717
// Define the environment variables here
1818
static const bitwindowdHost = Variable(
1919
'BITWINDOWD_HOST',
20-
String.fromEnvironment('BITWINDOWD_HOST', defaultValue: 'localhost'),
20+
String.fromEnvironment('BITWINDOWD_HOST', defaultValue: '127.0.0.1'),
2121
);
2222
static const bitwindowdPort = Variable(
2323
'BITWINDOWD_PORT',

bitwindow/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,4 +1471,4 @@ packages:
14711471
version: "0.0.6"
14721472
sdks:
14731473
dart: "3.10.7"
1474-
flutter: ">=3.38.7"
1474+
flutter: "3.38.7"

sail_ui/lib/classes/node_connection_settings.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CoreConnectionSettings extends ChangeNotifier {
4747

4848
return CoreConnectionSettings(
4949
'',
50-
'localhost',
50+
'127.0.0.1',
5151
defaultPort,
5252
'user',
5353
'password',
@@ -122,7 +122,7 @@ CoreConnectionSettings readMainchainConf() {
122122
final host =
123123
config.getEffectiveSetting('rpcconnect', networkSection) ??
124124
config.getEffectiveSetting('rpchost', networkSection) ??
125-
'localhost';
125+
'127.0.0.1';
126126
final port = confProvider.rpcPort; // Uses the getter that already handles sections
127127

128128
final configFile = confProvider.hasPrivateBitcoinConf ? 'bitcoin.conf' : 'bitwindow-bitcoin.conf';

sail_ui/lib/classes/rpc_config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ CoreConnectionSettings readRPCConfig(
5858
};
5959

6060
// Default values
61-
String host = 'localhost';
61+
String host = '127.0.0.1';
6262
int port = defaultPort;
6363
String username = 'user';
6464
String password = 'password';

sail_ui/lib/pages/create_wallet_page.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ class _SailCreateWalletPageState extends State<SailCreateWalletPage> {
102102
automaticallyImplyLeading: false,
103103
backgroundColor: SailTheme.of(context).colors.background,
104104
foregroundColor: SailTheme.of(context).colors.text,
105-
leading: (hasExistingWallet || widget.onBack != null) &&
105+
leading:
106+
(hasExistingWallet || widget.onBack != null) &&
106107
(_currentScreen == WelcomeScreen.initial || widget.initialScreen == _currentScreen)
107108
? IconButton(
108109
icon: const Icon(Icons.arrow_back),

sail_ui/lib/providers/bitcoin_conf_provider.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,12 @@ chain=main
563563
[main]
564564
port=8300
565565
rpcport=18301
566-
rpcbind=0.0.0.0
566+
rpcbind=127.0.0.1
567567
rpcallowip=0.0.0.0/0
568-
zmqpubhashblock=tcp://0.0.0.0:29001
569-
zmqpubhashtx=tcp://0.0.0.0:29002
570-
zmqpubrawblock=tcp://0.0.0.0:29003
571-
zmqpubrawtx=tcp://0.0.0.0:29004
568+
zmqpubhashblock=tcp://127.0.0.1:29001
569+
zmqpubhashtx=tcp://127.0.0.1:29002
570+
zmqpubrawblock=tcp://127.0.0.1:29003
571+
zmqpubrawtx=tcp://127.0.0.1:29004
572572
assumevalid=0000000000000000000000000000000000000000000000000000000000000000
573573
minimumchainwork=0x00
574574
listenonion=0
@@ -587,7 +587,7 @@ rpcpassword=password
587587
server=1
588588
listen=1
589589
txindex=1
590-
zmqpubsequence=tcp://0.0.0.0:29000
590+
zmqpubsequence=tcp://127.0.0.1:29000
591591
rpcthreads=20
592592
rpcworkqueue=100
593593
rest=1
@@ -681,7 +681,7 @@ $mainSection
681681
final confInfo = _getConfigFileInfo();
682682

683683
// Get connection settings from current config
684-
String host = 'localhost';
684+
String host = '127.0.0.1';
685685
String username = 'user';
686686
String password = 'password';
687687

@@ -709,12 +709,12 @@ $mainSection
709709
return {
710710
'port': '8300',
711711
'rpcport': '18301',
712-
'rpcbind': '0.0.0.0',
712+
'rpcbind': '127.0.0.1',
713713
'rpcallowip': '0.0.0.0/0',
714-
'zmqpubhashblock': 'tcp://0.0.0.0:29001',
715-
'zmqpubhashtx': 'tcp://0.0.0.0:29002',
716-
'zmqpubrawblock': 'tcp://0.0.0.0:29003',
717-
'zmqpubrawtx': 'tcp://0.0.0.0:29004',
714+
'zmqpubhashblock': 'tcp://127.0.0.1:29001',
715+
'zmqpubhashtx': 'tcp://127.0.0.1:29002',
716+
'zmqpubrawblock': 'tcp://127.0.0.1:29003',
717+
'zmqpubrawtx': 'tcp://127.0.0.1:29004',
718718
'assumevalid': '0000000000000000000000000000000000000000000000000000000000000000',
719719
'minimumchainwork': '0x00',
720720
'listenonion': '0',

sail_ui/lib/providers/enforcer_conf_provider.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'dart:async';
2-
import 'dart:io' show Directory, File, FileSystemEvent, Platform;
2+
import 'dart:io' show Directory, File, FileSystemEvent;
33

44
import 'package:flutter/foundation.dart';
55
import 'package:get_it/get_it.dart';
@@ -69,7 +69,7 @@ class EnforcerConfProvider extends ChangeNotifier {
6969

7070
/// Get expected node-rpc settings from BitcoinConfProvider
7171
Map<String, String> getExpectedNodeRpcSettings() {
72-
final host = Platform.isWindows ? 'localhost' : '0.0.0.0';
72+
const host = '127.0.0.1';
7373
final bitcoinConfProvider = GetIt.I.get<BitcoinConfProvider>();
7474
final port = bitcoinConfProvider.rpcPort;
7575

sail_ui/lib/rpcs/bitassets_rpc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ abstract class BitAssetsRPC extends SidechainRPC {
176176
class BitAssetsLive extends BitAssetsRPC {
177177
RPCClient _client() {
178178
final client = RPCClient(
179-
host: 'localhost',
179+
host: '127.0.0.1',
180180
port: binary.port,
181181
username: 'N/A',
182182
password: 'N/A',

sail_ui/lib/rpcs/bitnames_rpc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ abstract class BitnamesRPC extends SidechainRPC {
117117
class BitnamesLive extends BitnamesRPC {
118118
RPCClient _client() {
119119
final client = RPCClient(
120-
host: 'localhost',
120+
host: '127.0.0.1',
121121
port: binary.port,
122122
username: 'N/A',
123123
password: 'N/A',

sail_ui/lib/rpcs/bitwindow_api.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ class BitwindowRPCLive extends BitwindowRPC {
379379

380380
void _recreateConnection() {
381381
log.w('Recreating HTTP/2 connection for bitwindowd');
382-
_initializeConnection(host: 'localhost', port: binary.port);
382+
_initializeConnection(host: '127.0.0.1', port: binary.port);
383383
}
384384

385385
Future<T> _withRecreate<T>(Future<T> Function() operation) async {

0 commit comments

Comments
 (0)