Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Allows Node to get Windows' DNS configuration
branch: master
Failed to load latest commit information.
Debug First commit
NodeWinNetInfo Add npm, gyp bindings
.gitignore Add npm, gyp bindings
NodeWinNetInfo.sln First commit
README.md Add npm, gyp bindings
binding.gyp Add npm, gyp bindings
index.js Add npm, gyp bindings
package.json Add npm, gyp bindings

README.md

Node NetInfo addon

This addon for Node.js allows you to get the system's DNS configuration under Windows.

It doesn't work on *nix, where you can simply read /etc/resolv.conf to get the system's DNS servers.

Installation

This project is available on npm. Since it is a native (C++) addon, you'll need everything node-gyp needs to build projects, which includes Python 2.7 and MS VC++.

> npm install winnetinfo

Alternatively, you can download a compiled binary here if you're in a hurry (and taking candy from strangers is your thing).

Usage

  1. var ni = require('winnetinfo');
  2. ni.getNetworkParams();

You'll get something like this:

{ hostName: 'daguej',
  domainName: '',
  dnsServers:
   [ '8.8.8.8',
     '8.8.4.4', ],
  dnsEnabled: false,
  nodeType: 4,
  domain: '',
  arpProxyEnabled: false,
  routingEnabled: false,
  dhcpScope: '' }
Something went wrong with that request. Please try again.