
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
non-private-ip
Advanced tools
Picks the first reasonable looking IP address from network interfaces.
This should just work when running on a VPS, but also provides private
APIs
so that when running in LAN you get the first reasonable looking LAN IP address.
More info: http://en.wikipedia.org/wiki/Private_network
Your laptop probably does not have a non-local IP address, but your VPS server probably does. This just returns the first address, which will probably be IPv4.
This module is based on the "ip" module.
The main export is a function nonPrivateIP(interfaces, filter, details)
where:
interfaces
is either null
or a mock of os.networkInterfaces()
, typically
this should be null
filter
is a function of the shape (address, details) => boolean
where
address
is the IP address as a string, and details
is the whole object
with additional fields, e.g. address
, netmask
, family
, mac
, cidr
,
etcdetails
is a boolean that controls whether you want the return of the
function to be just the IP address as a string (false
, this is the
default) or the whole object with additional fields (true
)// On a VPS:
const nonPrivateIP = require('non-private-ip')
nonPrivateIP() // 80.78.25.153
// In a LAN:
const nonPrivateIP = require('non-private-ip')
nonPrivateIP.private() // 192.168.0.101
MIT
FAQs
see if you have a non private (i.e. public ip address)
The npm package non-private-ip receives a total of 2,050 weekly downloads. As such, non-private-ip popularity was classified as popular.
We found that non-private-ip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.