| 283 | | try { |
|---|
| 284 | | InetAddress ia = InetAddress.getByName(host); |
|---|
| 285 | | reachable = !ia.isAnyLocalAddress();// && ia.isReachable(5000); |
|---|
| 286 | | } catch (UnknownHostException e) { |
|---|
| | 284 | if (!host.equals("0.0.0.0") && |
|---|
| | 285 | !host.equals("127.0.0.1") && |
|---|
| | 286 | !host.equals("localhost") && |
|---|
| | 287 | !host.startsWith("192.168.") && |
|---|
| | 288 | host.indexOf('.') >= 0) { |
|---|
| | 289 | try { |
|---|
| | 290 | InetAddress ia = InetAddress.getByName(host); |
|---|
| | 291 | reachable = !ia.isAnyLocalAddress();// && ia.isReachable(5000); |
|---|
| | 292 | } catch (UnknownHostException e) { |
|---|
| | 293 | } |
|---|
| | 344 | |
|---|
| | 345 | static boolean isOurs(String url, String host) { |
|---|
| | 346 | return host.equals("simile.mit.edu") || |
|---|
| | 347 | host.equals("static.simile.mit.edu") || |
|---|
| | 348 | host.equals("picker.mit.edu") || |
|---|
| | 349 | host.equals("pickr.mit.edu") || |
|---|
| | 350 | url.startsWith("http://haystack.lcs.mit.edu") || |
|---|
| | 351 | url.startsWith("http://haystack.csail.mit.edu") || |
|---|
| | 352 | url.startsWith("http://uid.csail.mit.edu") || |
|---|
| | 353 | url.startsWith("http://groups.csail.mit.edu/haystack/") || |
|---|
| | 354 | url.startsWith("http://groups.csail.mit.edu/uid/") || |
|---|
| | 355 | url.startsWith("http://people.csail.mit.edu/dfhuynh/") || |
|---|
| | 356 | url.startsWith("http://people.csail.mit.edu/karger/") || |
|---|
| | 357 | url.startsWith("http://projects.csail.mit.edu/picker/") || |
|---|
| | 358 | url.startsWith("http://projects.csail.mit.edu/ifd/") || |
|---|
| | 359 | url.startsWith("http://davidhuynh.net/"); |
|---|
| | 360 | } |
|---|