@fuyoo/real_ip
v1.1.5
Published
a packgage and cli-tool to get current real ip not 127.0.0.1 or localhost ...
Downloads
5
Readme
real_ip package and cli tool
support nodejs version
version >= 12.0.0
how to use?
as a cli tool
npm i -g @fuyoo/real_ip
execute command ip show
as a node.js package
npm i @fuyoo/real_ip
require this package
const real_ip = require('@fuyoo/real_ip'); (async () => { const res = await real_ip(); console.log(res); })
principle
this package use udpV4 to connect dns ip addresses.
when connect successed we close this connection.
get the used local ip addres.