We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It returns the MAC-address of my server, not the MAC-address of the client that is visiting the page.
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Node.js\n'); module.exports = require('./lib/address'); var address = require('address'); // default interface 'eth' on linux, 'en' on osx. address.ip(); // '192.168.0.2' address.ipv6(); // 'fe80::7aca:39ff:feb0:e67d' address.mac(function (err, addr) { console.log('Mac: '+addr); // '78:ca:39:b0:e6:7d' }); // local loopback address.ip('lo'); // '127.0.0.1' // vboxnet MAC address.mac('vboxnet', function (err, addr) { console.log(addr); // '0a:00:27:00:00:00' }); address(function (err, addrs) { console.log(addrs.ip, addrs.ipv6, addrs.mac); // '192.168.0.2', 'fe80::7aca:39ff:feb0:e67d', '78:ca:39:b0:e6:7d' }); address('vboxnet', function (err, addrs) { console.log(addrs.ip, addrs.ipv6, addrs.mac); // '192.168.56.1', null, '0a:00:27:00:00:00' }); address.interface('IPv4', 'eth1'); address.dns(function (err, addrs) { console.log('DNS: '+addrs); res.writeHead(200, {'Content-Type': 'text/plain'}); res.end(addrs); // ['10.13.2.1', '10.13.2.6'] }); }).listen(8124, "192.168.2.42"); console.log('Server running at http://192.168.2.42:8124/');
The text was updated successfully, but these errors were encountered:
It can't got the client MAC address from this module.
Sorry, something went wrong.
So the script isn't for getting the clients mac address?
It just work on the current machine.
@fengmk2 (https://twitter.com/fengmk2) @python发烧友 (http://weibo.com/imk2/profile) http://fengmk2.github.com (http://fengmk2.github.com/)
记得当时年纪小/ 你爱谈天,我爱笑/ 有一回并肩坐在桃树下/ 风在林梢鸟儿在叫/ 我们不知怎样睡着了/ 梦里花落知多少
On Tuesday, September 24, 2013 at 5:32 PM, Jaspur wrote:
So the script isn't for getting the clients mac address? — Reply to this email directly or view it on GitHub (#4 (comment)).
— Reply to this email directly or view it on GitHub (#4 (comment)).
No branches or pull requests
It returns the MAC-address of my server, not the MAC-address of the client that is visiting the page.
The text was updated successfully, but these errors were encountered: