This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Since the code to actually figure this out doesn't exist in node yet | |
// | |
// see: https://groups.google.com/forum/?fromgroups#!topic/nodejs-dev/QbcnxS0_yyg | |
// | |
var guessGateway = function () { | |
var network = os.networkInterfaces(), | |
guess = '10.0.0.1'; | |
Object.keys(network).forEach(function(interfaces){ |