2.0.0-a • Published 5 years ago

proxycheck-node.js v2.0.0-a

Weekly downloads
41
License
MIT
Repository
github
Last release
5 years ago

proxycheck-node.js

node.js library for calling the proxycheck.io v2 API which allows you to check if an IP Address is a Proxy or VPN and get the Country, ASN and Provider for the IP Address being checked.

Install via npm/yarn

You can install the library via npm by running the following command:

npm i proxycheck-node.js

Usage

One IP

async/await

const proxy_check = require('proxycheck-node.js'); 
const check = new proxy_check({api_key: '111111-222222-333333-444444'}); 
const result = await check.check('127.0.0.1');
console.log(result)

.then

const proxy_check = require('proxycheck-node.js'); 
const check = new proxy_check({api_key: '111111-222222-333333-444444'}); 
const result = check.check('127.0.0.1').then(result => console.log(result));

async/await with options

const proxy_check = require('proxycheck-node.js'); 
const check = new proxy_check({api_key: '111111-222222-333333-444444'}); 
const result = await check.check('127.0.0.1', { vpn: true });
console.log(result)

Multiple IPs

async/await with options

const proxy_check = require('proxycheck-node.js'); 
const check = new proxy_check({api_key: '111111-222222-333333-444444'}); 
const result = await check.check(['8.8.8.8', '1.1.1.1'], { vpn: true });
console.log(result)
{
  status: 'ok',
  '8.8.8.8': { proxy: 'no' },
  '1.1.1.1': { proxy: 'no' }
}

Service Limits

  • Free users without an API Key = 100 Daily Queries
  • Free users with an API Key = 1,000 Daily Queries
  • Paid users with an API Key = 10,000 to 10.24 Million+ Daily Queries

Get your API Key at proxycheck.io it's free.

Docs

Classes

Typedefs

proxycheck

Kind: global class

new proxycheck(param0)

ParamTypeDescription
param0cmdConstructorConstructor.

Example

const proxy_check = require('proxycheck-node.js');
const check = new proxy_check({api_key: '111111-222222-333333-444444'});

proxycheck.check(ip, options) ⇒ Object

Checks IP(s) with the proxycheck v2 api.

Kind: instance method of proxycheck
Returns: Object - Command Class.

ParamTypeDescription
ipString | Array.<String>Ip to check
optionsproxycheck_OptionsOptions for the IP_check

Example

const check = new proxy_check({api_key: '111111-222222-333333-444444'});
const result = await check.check(['8.8.8.8', '1.1.1.1'], { vpn: true });
console.log(result)

Example

const check = new proxy_check({api_key: '111111-222222-333333-444444'});
const result = check.check('8.8.8.8', { vpn: true }).then(result => console.log(result))

proxycheck.getUsage() ⇒ proxycheck_getUsageReturn

Dashboard: Gets your Usage

Kind: instance method of proxycheck
Returns: proxycheck_getUsageReturn - Result
Example

const check = new proxy_check({ api_key: '111111-222222-333333-444444' });
const result = await check.getUsage();
console.log(result);

proxycheck.getQuerys() ⇒ Object

Dashboard: Gets your Querys

Kind: instance method of proxycheck
Returns: Object - Result
Example

const check = new proxy_check({ api_key: '111111-222222-333333-444444' });
const result = await check.getQuerys();
console.log(result);

proxycheck.getDetections(options) ⇒ Object

Gets the Detections

Kind: instance method of proxycheck
Returns: Object - Result

ParamType
optionsproxycheck_getDetectionsOptions

Example

const check = new proxy_check({ api_key: '111111-222222-333333-444444' });
const result = await check.getDetections({ limit: 50 });
console.log(result);

proxycheck_Constructor : Object

Kind: global typedef
Properties

NameTypeDescription
api_keystringThe Api Key

proxycheck_Options : Object

Kind: global typedef
Properties

NameTypeDefaultDescription
vpnBooleanfalseWhen the vpn flag is supplied we will perform a VPN check on the IP Address and present the result to you.
asnBooleanfalseWhen the asn flag is supplied we will perform an ASN check on the IP Address and present you with the provider name, ASN, country, country isocode, city (if it's in a city) and lang/long for the IP Address.
nodeBooleannodeWhen the node flag is supplied we will display which node within our cluster answered your API call. This is only really needed for diagnosing problems with our support staff.
timeBooleanfalseWhen the time flag is supplied we will display how long this query took to be answered by our API excluding network overhead.
infBooleantrueWhen the inf flag is set to 0 (to disable it) we will not run this query through our real-time inference engine. In the absence of this flag or if it's set to 1 we will run the query through our real-time inference engine.
riskfalse | 1 | 2falseWhen the risk flag is set to 1 we will provide you with a risk score for this IP Address ranging from 0 to 100. Scores below 33 can be considered low risk while scores between 34 and 66 can be considered high risk. Addresses with scores above 66 are considered very dangerous. When the risk flag is set to 2 we will still provide you with the above risk score but you'll also receive individual counts for each type of attack we witnessed this IP performing across our customer network and our own honeypots within the days you specify by the &days= flag.
portBooleanfalseWhen the port flag is supplied we will display to you the port number we saw this IP Address operating a proxy server on.
seenBooleanfalseWhen the seen flag is supplied we will display to you the most recent time we saw this IP Address operating as a proxy server.
daysNumber7When the days flag is supplied we will restrict our proxy results to between now and the amount of days you specify. For example if you supplied &days=2 we would only check our database for Proxies that we saw within the past 48 hours. By default without this flag supplied we search within the past 7 days.
tagStringWhen the tag flag is supplied we will tag your query with the message you supply.

proxycheck_getUsageReturn : Object

Kind: global typedef
Properties

NameTypeDescription
errorStringError?
queries_todayNumber
daily_limitNumber
queries_totalNumber
plan_tierString

proxycheck_getDetectionsOptions : Object

Kind: global typedef
Properties

NameTypeDefault
limitNumber100
offsetNumber0
2.0.0-a

5 years ago

2.0.0

5 years ago

1.1.0-a

5 years ago

1.1.0

5 years ago

1.0.0-a

5 years ago

1.0.0

5 years ago