Get your internal IP address
$ npm install internal-ip
const internalIp = require('internal-ip'); internalIp.v6().then(ip => { console.log(ip); //=> 'fe80::1' }); internalIp.v4().then(ip => { console.log(ip); //=> '10.0.0.79' });
In the case no address can be determined, ::1
or 127.0.0.1
will be returned as a fallback. If you think this is incorrect, please open an issue.
MIT © Sindre Sorhus
Combine open-source packages with your private code and publish to a private registry behind the firewall. npm ♥ enterprise developers
ip, ipv6, ipv4, address, internal, local, machine, system, net, gateway
default-gateway, ip, ipaddr.js
lujing-rax-scripts, webpack-dev-server, budoz, node-pumatronix, feng-rc-tools, fget-cli, unvue, mstream, rc-tools, @studio/budo, castnow, magistrate, simple-notification-service, ally-cli, formide-client, mozunpnp, dlnacast, deer-tools, rn-tools, dora-plugin-weinre, spm, spm-webpack-server, lego, spmh, node-red-contrib-homie, torrentcast-player, af5, static-file-server, spm-server, hlscast, ilego, ips, moekit, zoster, appc-cache, budo-marcuswestin-fix, homie-server, yqb, antd-bin, dora-plugin-qrcode, script-result-email, server-welcome, @rtsao/budo, chromecast-audio-cli, hench, hyperbolic, airplayer, codeglue, airfile, dflow, and more