安装 npm install node-getmacip 导入 const {getMac, getIp} = require('node-getmacip') 获取 mac let mac = getMac() console.log(mac) 获取 ip let ip = getIp() console.log(ip) 开源协议 ISC