Skip to content

Commit c441e3d

Browse files
committed
use '127.0.0.1' instead of 'localhost' for consistency
1 parent 4afe649 commit c441e3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/screens/tunnel_list_screen.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ class _TunnelListScreenState extends State<TunnelListScreen>
596596
? Icons.stop_circle
597597
: Icons.play_circle,
598598
color: tunnel.isConnected
599-
? Colors.red
600-
: Colors.green,
599+
? Colors.black87
600+
: Colors.black54,
601601
),
602602
tooltip: tunnel.isConnected
603603
? 'Disconnect'
@@ -1142,7 +1142,7 @@ class _TunnelListScreenState extends State<TunnelListScreen>
11421142
try {
11431143
// Create the URL for the local tunnel endpoint
11441144
final localUrl =
1145-
'http://localhost:${_extractPortFromEndpoint(remoteEndpoint)}';
1145+
'http://127.0.0.1:${_extractPortFromEndpoint(remoteEndpoint)}';
11461146
final uri = Uri.parse(localUrl);
11471147

11481148
if (await canLaunchUrl(uri)) {
@@ -1186,7 +1186,7 @@ class _TunnelListScreenState extends State<TunnelListScreen>
11861186
if (!mounted) return;
11871187

11881188
try {
1189-
final localUrl = 'http://localhost:$localPort';
1189+
final localUrl = 'http://127.0.0.1:$localPort';
11901190
final uri = Uri.parse(localUrl);
11911191

11921192
if (await canLaunchUrl(uri)) {

lib/services/tunnel_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ class TunnelService extends ChangeNotifier {
482482

483483
Future<bool> _isPortInUse(int port) async {
484484
try {
485-
final socket = await ServerSocket.bind('localhost', port);
485+
final socket = await ServerSocket.bind('127.0.0.1', port);
486486
await socket.close();
487487
return false;
488488
} catch (e) {

0 commit comments

Comments
 (0)