Navigation Menu

Skip to content

sideshowcoder/Add-NodeJS-DNS-Server-Settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Add DNS server option to Nodejs

The patch enables the current version of Node (0.4.0) to use different DNS servers than the ones specified in resolve.conf, which is the default. To use the DNS server settings use dnsext.js which is a extended version of the normal dns module for node which exposes the initialization of ares channels with different nameservers, as well as the handling of multiple channels. For usage examples see dnsext-example.js

Applying the patch

git clone https://github.com/ry/node.git cd node git apply add_dns_channel_ns_setting.patch Usage ----- var dnsext = require('./dnsext'); var g = dnsext.initChannelWithNs('8.8.4.4'); dnsext.getHostByName(g, 'google.de', function(err, domains){ if(err) console.log(err); console.log(domains); });

About

Add setting to expose nameserver setting per channel in ares library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published