Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

networkInterfaces key utun0 is not a ip #6

Closed
noyobo opened this issue Jul 5, 2016 · 2 comments
Closed

networkInterfaces key utun0 is not a ip #6

noyobo opened this issue Jul 5, 2016 · 2 comments

Comments

@noyobo
Copy link

noyobo commented Jul 5, 2016

> os.networkInterfaces()
{ lo0:
   [ { address: '::1',
       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
       family: 'IPv6',
       mac: '00:00:00:00:00:00',
       scopeid: 0,
       internal: true },
     { address: '127.0.0.1',
       netmask: '255.0.0.0',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
       internal: true },
     { address: 'fe80::1',
       netmask: 'ffff:ffff:ffff:ffff::',
       family: 'IPv6',
       mac: '00:00:00:00:00:00',
       scopeid: 1,
       internal: true } ],
  en0:
   [ { address: 'fe80::3e15:c2ff:fedf:58ea',
       netmask: 'ffff:ffff:ffff:ffff::',
       family: 'IPv6',
       mac: '3c:15:c2:df:58:ea',
       scopeid: 4,
       internal: false },
     { address: '192.168.199.134',
       netmask: '255.255.255.0',
       family: 'IPv4',
       mac: '3c:15:c2:df:58:ea',
       internal: false } ],
  awdl0:
   [ { address: 'fe80::b85a:4dff:fe78:452',
       netmask: 'ffff:ffff:ffff:ffff::',
       family: 'IPv6',
       mac: 'ba:5a:4d:78:04:52',
       scopeid: 8,
       internal: false } ],
  utun0:
   [ { address: '30.39.56.182',
       netmask: '255.255.255.255',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
       internal: false } ] }
internalIp.v4() => 30.39.56.182
@noyobo noyobo changed the title Interfaces key utun0 is not a ip networkInterfaces key utun0 is not a ip Jul 5, 2016
@silverwind
Copy link
Collaborator

This is basically a duplicate of #5. The issue is that this module blindly returns the last non-loopback interface address, which can often be wrong.

The proper solution would be to parse the routing table for the default gatway interface, but right now, the only module that provides this does not work on Windows (https://github.com/indutny/node-netroute).

noyobo added a commit to noyobo/dora-plugin-livereload that referenced this issue Jul 14, 2016
@noyobo
Copy link
Author

noyobo commented Jul 28, 2016

Finally found This is because I opened the local agent 😂 have to open the agent, the work need.

@noyobo noyobo closed this as completed Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants