npm-layer7-protections
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

Package version Package status Build Status Coverage Status Known Vulnerabilities

Layer7-protections

Tested on linux based systems using iptables.

Installation

npm

npm install npm-layer7-protections

yarn

yarn add npm-layer7-protections

Usage

const { isProxy, dropIp, checkIp, openFile } = require('npm-layer7-protections');
  openFile('IP2PROXY_DATABASE_FILE.bin')
    .then(() => {
      return isProxy(IP);
    })
    .then(() => {
      return dropIp(IP);
    })
    .then(() => {
      console.log('Success');
    })
    .catch(() => {
      console.log('Error');
    });
checkIp(IP, 'IP2PROXY_DATABASE_FILE.bin'); // checkIp uses both modules: isProxy and dropIp

Note

IP2PROXY_DATABASE_FILE.bin is an example name of the file that you can download via this site: https://lite.ip2location.com/database/px1-ip-country

Package Sidebar

Install

npm i npm-layer7-protections

Weekly Downloads

15

Version

1.1.7

License

MIT

Unpacked Size

93.9 MB

Total Files

27

Last publish

Collaborators

  • goatseller