Add 0.0.0.0 to server IP combo box, allow listening on all IPs (#1612)

This commit is contained in:
David Klingenberg
2025-04-22 16:46:43 +02:00
committed by GitHub
parent a55a7a772e
commit a86f0e1da1
+4 -5
View File
@@ -36,16 +36,15 @@ public partial class InterfacePortForm : Form
if (ip.AddressFamily == AddressFamily.InterNetwork)
interfaceComboBox.Items.Add(ip.ToString());
}
interfaceComboBox.Items.Add("0.0.0.0");
// select the last one by default to match the existing behavior
if (interfaceComboBox.Items.Count > 0)
{
interfaceComboBox.SelectedIndex = interfaceComboBox.Items.Count - 1;
} else
{
// default to ? just like previous version
interfaceComboBox.Items.Add("?");
interfaceComboBox.SelectedIndex = 0;
}
// check to see if the selected listener IP is in our list.
if (interfaceComboBox.Items.Contains(selectedListenerIp))
{