GithubHelp home page GithubHelp logo

ip2location / ip2proxy-nodejs Goto Github PK

View Code? Open in Web Editor NEW
48.0 6.0 12.0 99 KB

IP2Proxy Node.js module allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.

Home Page: https://www.ip2location.com/ip2proxy/developers/nodejs

License: MIT License

JavaScript 100.00%
vpn-detection proxy-detection anonymous-proxy ip2proxy proxy-database vpn tor proxy

ip2proxy-nodejs's Introduction

npm npm

IP2Proxy Node.js Module

This module allows user to query an IP address if it was being used as VPN anonymizer, open proxies, web proxies, Tor exits, data center, web hosting (DCH) range, search engine robots (SES), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It lookup the proxy IP address from IP2Proxy BIN Data file. This data file can be downloaded at

Developer Documentation

To learn more about installation, usage, and code examples, please visit the developer documentation at https://ip2proxy-nodejs.readthedocs.io/en/latest/index.html.

Proxy Type

Proxy Type Description
VPN Anonymizing VPN services
TOR Tor Exit Nodes
PUB Public Proxies
WEB Web Proxies
DCH Hosting Providers/Data Center
SES Search Engine Robots
RES Residential Proxies [PX10+]
CPN Consumer Privacy Networks. [PX11+]
EPN Enterprise Private Networks. [PX11+]

Usage Type

Usage Type Description
COM Commercial
ORG Organization
GOV Government
MIL Military
EDU University/College/School
LIB Library
CDN Content Delivery Network
ISP Fixed Line ISP
MOB Mobile ISP
DCH Data Center/Web Hosting/Transit
SES Search Engine Spider
RSV Reserved

Threat Type

Threat Type Description
SPAM Spammer
SCANNER Security Scanner or Attack
BOTNET Spyware or Malware

ip2proxy-nodejs's People

Contributors

chrislim2888 avatar ip2location avatar mailboxvalidator avatar ryanocf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ip2proxy-nodejs's Issues

getProxyType() return DCH but isProxy() return 0... etcetera

return value of isProxy() is not useful. First here is an IPA that has a proxy type of DCH, so isProxy should return 2 but it returns 0.

it doesn't consider VPN proxy either, which I think it should (some PUBlic proxies i found were detected as VPN)

there are probably more like this and it makes isProxy() not useful.

so instead I found this to work much better: getProxyType(ip) == "-", because all the ip2proxy types I want to block.

Different results for binary and csv from commercial PX1 database

Hi, here are two following lines from proxy ipv6 from PX1-IPV6-COUNTRY.ZIP commercial proxy database (.csv):

"58568930459363523583593088306802327552","58568930459364732509412702935977033727","US","United States of America"
"58568930459364732509412702935977033728","58568930459365941435232317565151739903","RU","Russian Federation"

Both of them give different results using PX1-IP-COUNTRY.BIN.ZIP binary โ€” one of them is marked as a proxy another one as not a proxy:

Here are the results for getAll method for both:

// line 2462565 in .csv file
{
    "ip": "2c0f:f738:0:0:0:0:0:0",
    "ipNo": "58568930459363523583593088306802327552",
    "isProxy": 0,
    "proxyType": "NOT SUPPORTED",
    "countryShort": "-",
    "countryLong": "-",
    "region": "NOT SUPPORTED",
    "city": "NOT SUPPORTED",
    "isp": "NOT SUPPORTED",
    "domain": "NOT SUPPORTED",
    "usageType": "NOT SUPPORTED",
    "asn": "NOT SUPPORTED",
    "as": "NOT SUPPORTED",
    "lastSeen": "NOT SUPPORTED",
    "threat": "NOT SUPPORTED",
    "provider": "NOT SUPPORTED"
  }
// line 2462566 in .csv file
{
  "ip": "2c0f:f738:1:0:0:0:0:0",
  "ipNo": "58568930459364732509412702935977033728",
  "isProxy": 1,
  "proxyType": "NOT SUPPORTED",
  "countryShort": "RU",
  "countryLong": "Russian Federation",
  "region": "NOT SUPPORTED",
  "city": "NOT SUPPORTED",
  "isp": "NOT SUPPORTED",
  "domain": "NOT SUPPORTED",
  "usageType": "NOT SUPPORTED",
  "asn": "NOT SUPPORTED",
  "as": "NOT SUPPORTED",
  "lastSeen": "NOT SUPPORTED",
  "threat": "NOT SUPPORTED",
  "provider": "NOT SUPPORTED"
}

How come? Both should be marked as a proxy

No async version of the module?

I'm really amuzed about implementation of the module. All funcs are implemented as Sync. The module is supposed to work in async environment of web, is not it? What, are we writing python?

How to use in koa?

Hello.

const Koa = require('koa');
const app = new Koa();

app.use(async ctx => {
  console.log(ctx.ip); // IP user
  ctx.body = 'Hello World';
});

app.listen(3000);

How to detect vpn?

Error reading bin file

I have added and reconfigured but it show the same error again and again

Any solution ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.