Conversation
|
After looking around I see that there is also a way forward on windows with the registry entry |
|
Let's just do it properly: https://github.com/daguej/node-winnetinfo |
|
I'm all for doing things TheRightWay(tm) where possible. I wonder if doing it properly is to actually use
So to use a third party solution like your new module for this, means we either include it as a dependency (in which case your module needs to install cleanly on unix platforms and essentially be a NOOP), or we add it as an optionalDependency and handle the case when its not installed gracefully. Sadly NPM doesn't currently support conditional dependencies (or even platform dependencies for that matter) Another option would be for native-dns to break a design goal of being pure javascript and have a binding portion just like your module, which is only built for the win32 platform. |
|
f6a794d contains some refactoring, watching of On win32 the initial name servers are google's, and the it should theoretically load the proper hosts file. Please let me know if this works (it's not currently published to npm) |
|
This project is no longer maintained, but we are happy to link to a well maintained fork. Please see: #111 |
AKA fix it so it doesn't crash as soon as you start up.
Under Windows, /etc/hosts and /etc/resolv.conf obviously don't exist. This patches platform.js so that you can at least get up and running under Windows.
GetNetworkParams), but that means building a native Addon. You could also parse the output ofipconfig.exe /all, but that feels ugly. I just faked it for now using Google's public DNS servers.