| 396 | for (const info of iface) { | 396 | for (const info of iface) { |
| 397 | if (info.family === 'IPv6') { | 397 | if (info.family === 'IPv6') { |
| 398 | hasIPv6 = true; | 398 | hasIPv6 = true; |
| 399 | if (info.internal === true) { | 399 | if (info.address === '::1') { |
| 400 | hasIPv6Local = true; | 400 | hasIPv6Local = true; |
| 401 | } | 401 | } |
| 402 | } | 402 | } |
| 403 | | 403 | |
| 404 | if (info.family === 'IPv4') { | 404 | if (info.family === 'IPv4') { |
| 405 | hasIPv4 = true; | 405 | hasIPv4 = true; |
| 406 | if (info.internal === true) { | 406 | if (info.address === '127.0.0.1') { |
| 407 | hasIPv4Local = true; | 407 | hasIPv4Local = true; |
| 408 | } | 408 | } |
| 409 | } | 409 | } |