Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipware

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipware - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## 0.0.6
Enhancement:
- Added support for 1.0.0.0/8 and 2.0.0.0/8 blocks
## 0.0.5
Enhancement:
- Return the local loop address if no ip is found
## 0.0.4

@@ -2,0 +14,0 @@

4

defaults.json

@@ -15,5 +15,3 @@ {

"IPV4_EXTERNALLY_NON_ROUTABLE_IP_PREFIX": [
"0.",
"1.",
"2."
"0."
],

@@ -20,0 +18,0 @@

{
"name": "ipware",
"version": "0.0.5",
"version": "0.0.6",
"description": "Returns the real IP address of users in Node.js",

@@ -24,3 +24,3 @@ "main": "index.js",

"devDependencies": {
"mocha": "~1.3.2"
"mocha": "~2.0.0"
},

@@ -27,0 +27,0 @@ "scripts": {

@@ -6,4 +6,6 @@ Node IPware

[![build-status-image-travis]][travis]
[![Build Status](https://secure.travis-ci.org/un33k/node-ipware.png?branch=master)](http://travis-ci.org/un33k/node-ipware)
[![Downloads](http://img.shields.io/npm/dm/ipware.svg)](https://npmjs.org/package/ipware)
Overview

@@ -89,4 +91,2 @@ ====================

"0.",
"1.",
"2."
],

@@ -172,4 +172,1 @@

Released under a ([BSD](LICENSE.md)) license.
[build-status-image-travis]: https://secure.travis-ci.org/un33k/node-ipware.png?branch=master
[travis]: http://travis-ci.org/un33k/node-ipware?branch=master

@@ -192,1 +192,21 @@ var get_ip = require('..')().get_ip,

});
describe('get_ip(): IPV4: Test 1.0.0.0/8 blocks', function() {
it('test_1_0_0_0_block', function() {
var request = {headers: {}};
request.headers.HTTP_X_REAL_IP = '1.0.0.0';
get_ip(request);
assert.equal(request.clientIp, '1.0.0.0');
assert.equal(request.clientIpRoutable, true);
});
});
describe('get_ip(): IPV4: Test 2.0.0.0/8 blocks', function() {
it('test_2_0_0_0_block', function() {
var request = {headers: {}};
request.headers.REMOTE_ADDR = '2.0.0.1';
get_ip(request);
assert.equal(request.clientIp, '2.0.0.1');
assert.equal(request.clientIpRoutable, true);
});
});
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