@fuyoo/real_ip
v1.1.5
Published
a packgage and cli-tool to get current real ip not 127.0.0.1 or localhost ...
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_ipexecute command ip show
as a node.js package
npm i @fuyoo/real_iprequire this packageconst 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.
