hwball 8 years ago
parent 79d90f6ad5
commit 8f12f42007

@ -42,8 +42,8 @@ public class HttpMatchBrowserHost extends Thread {
Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
boolean matches = false; boolean matches = false;
String ip = ""; String ip = "";
Pattern localIpPattern = Pattern.compile("192\\.168\\..*"); Pattern localIpPattern = Pattern.compile("192\\.168\\.1\\..*");
Pattern ipPattern = Pattern.compile("[0-9]{0,3}\\.[0-9]{0,3}\\.[0-9]{0,3}\\.[0-9]{0,3}"); Pattern ipPattern = Pattern.compile("192\\.168\\..{0,3}\\..*");
while(e.hasMoreElements()) while(e.hasMoreElements())
{ {
if (matches){ if (matches){

Loading…
Cancel
Save