New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

client-address

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

client-address

Obtain client ipv6 / ipv4 address from Node HTTP / HTTPS request

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

client-address

Obtain client ipv6 / ipv4 address from Node HTTP / HTTPS request

Easy to use Client Address Request Header parser

version Downloads

Features

  • Web Socket support
  • Remote Address support
  • Cluster Client IP Address support
  • Real-IP Support
  • Forwarded-For Support
  • Proper address fall-through chain built in
  • IPV4 from IPV6 address supported

Installation

$ npm i client-address --save

Usage

const getClientAddress = require('client-address')

const handler = (req, res) {
  // Enforce IPV4 address
  let IPV4 = address.v4(req)

  // IPV6 or IPV4
  let IP = address(req)
}

Documentation

getClientAddress(Object request) -> IPV6 / IPV4

Returns either a IPV4 or IPV6 address.

getClientAddress.v4(req) -> IPV4

Returns a IPV4 address.

License

MIT © 2016 Nijiko Yonskai

Keywords

FAQs

Package last updated on 27 Sep 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc