external-ip
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -7,3 +7,3 @@ 'use strict'; | ||
replace: true, // true: replace the default services list, false: extend it, default: false | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 600, // set timeout per request, default: 500ms | ||
@@ -10,0 +10,0 @@ 'getIP': 'parallel' |
@@ -24,3 +24,3 @@ #!/usr/bin/env node | ||
console.log('$ external-ip'); | ||
console.log('$ external-ip -P -t 1500 -R -s http://icanhazip.com/ -s http://ifconfig.me/ip'); | ||
console.log('$ external-ip -P -t 1500 -R -s http://icanhazip.com/ -s http://ifconfig.io/ip'); | ||
}); | ||
@@ -27,0 +27,0 @@ |
@@ -23,3 +23,3 @@ 'use strict'; | ||
'http://icanhazip.com/', | ||
'http://ifconfig.me/ip', | ||
'http://ifconfig.io/ip', | ||
'http://ip.appspot.com/', | ||
@@ -31,3 +31,4 @@ 'http://curlmyip.com/', | ||
'http://myip.dnsomatic.com/', | ||
'http://ipecho.net/plain' | ||
'http://ipecho.net/plain', | ||
'http://diagnostic.opendns.com/myip' | ||
], | ||
@@ -105,2 +106,2 @@ timeout: 1000 | ||
return getIP[config.getIP]; | ||
}; | ||
}; |
{ | ||
"name": "external-ip", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "A node.js library to get your external ip from multiple services", | ||
@@ -37,11 +37,11 @@ "main": "index.js", | ||
"dependencies": { | ||
"commander": "^2.3.0", | ||
"commander": "^2.9.0", | ||
"evented-async-loop": "^0.1.1", | ||
"request": "^2.40.0", | ||
"revalidator": "^0.2.0" | ||
"revalidator": "^0.3.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^1.9.1", | ||
"mocha": "^1.21.4" | ||
"chai": "^3.4.0", | ||
"mocha": "^2.3.3" | ||
} | ||
} |
@@ -43,3 +43,3 @@ #external-ip [![Build Status](https://travis-ci.org/J-Chaniotis/external-ip.svg?branch=master)](https://travis-ci.org/J-Chaniotis/external-ip) [![Dependency Status](https://david-dm.org/j-Chaniotis/external-ip.svg)](https://david-dm.org/j-Chaniotis/external-ip) | ||
replace: true, | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 600, | ||
@@ -90,3 +90,3 @@ getIP: 'parallel' | ||
$ external-ip | ||
$ external-ip -P -t 1500 -R -s http://icanhazip.com/ -s http://ifconfig.me/ip | ||
$ external-ip -P -t 1500 -R -s http://icanhazip.com/ -s http://ifconfig.io/ip | ||
``` | ||
@@ -93,0 +93,0 @@ ##Test |
@@ -10,6 +10,8 @@ 'use strict'; | ||
var timeout = 3000; | ||
describe('index.js test', function () { | ||
it('Should return an IP with default configuration', function (done) { | ||
this.timeout(3000); | ||
this.timeout(timeout); | ||
var getIP = extIP(); | ||
@@ -24,8 +26,8 @@ getIP(function (err, ip) { | ||
it('Should return an IP with custom configuration', function (done) { | ||
this.timeout(3000); | ||
this.timeout(timeout); | ||
var getIP = extIP({ | ||
replace: true, // true: replace the default services list, false: extend it, default: false | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
timeout: 600, // set timeout per request, default: 500ms, | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: timeout, // set timeout per request, default: 500ms, | ||
getIP: 'parallel' | ||
@@ -32,0 +34,0 @@ }); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
replace: false, | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 500 | ||
@@ -10,0 +10,0 @@ }); |
@@ -31,3 +31,3 @@ 'use strict'; | ||
replace: false, | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 500, | ||
@@ -37,3 +37,3 @@ gerIP: 'sequential' | ||
b: { | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 500, | ||
@@ -83,3 +83,3 @@ getIP: 'parallel' | ||
replace: false, | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 500, | ||
@@ -90,3 +90,3 @@ getIP: 'sequential' | ||
b: { | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.me/ip'], | ||
services: ['http://ifconfig.co/x-real-ip', 'http://ifconfig.io/ip'], | ||
timeout: 1000, | ||
@@ -93,0 +93,0 @@ getIP: 'parallel' |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21556
439
+ Addedrevalidator@0.3.1(transitive)
- Removedrevalidator@0.2.0(transitive)
Updatedcommander@^2.9.0
Updatedrevalidator@^0.3.1