Permalink
Browse files

use ares to retrieve name servers on windows

  • Loading branch information...
1 parent f1e1952 commit 574f4789120a4daa9695047169d9feaf22fdd02d @tjfontaine committed Apr 17, 2012
Showing with 11 additions and 10 deletions.
  1. +11 −10 lib/dns_platform.js
View
@@ -87,16 +87,17 @@ Platform.prototype._populate = function() {
switch (os.platform()) {
case 'win32':
- this.name_servers = [
- {
- address: '8.8.8.8',
- port: 53
- },
- {
- address: '8.8.4.4.',
- port: 53
- }
- ];
+ process.binding('cares_wrap').getServers(function (servers) {
+ servers.forEach(function (server) {
+ self.name_servers.push({
+ address: server,
+ port: 53,
+ });
+ });
+
+ self._nsReady = true;
+ self._checkReady();
+ });
hosts = path.join(process.env.SystemRoot,
'\\System32\\drivers\\etc\\hosts');
break;

0 comments on commit 574f478

Please sign in to comment.