New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-server-toolbox

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-server-toolbox

A firewall / proxy server for NodeJS Express

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

express-server-toolbox

Includes

  1. DDOS, Spam & Brute force protection
  2. Proxy server for all request/response types
  3. Get and Post parameters get sanitized

Example

// NPM Packages
const expressServerToolkit = require("express-server-toolkit");
const express = require("express");
// Setting up the proxy [Host, Port, Enctype, Timeout]
const ProxyLocalhost = new expressServerToolkit.proxy(
  "localhost",
  8080,
  "http",
  3000
);
// Setting up the DDOS Prevention [MongoDB URI, Max requests per hour]
// Keep in mind that the images/post also count as request, so have at least a limit of a few thousand.
const DDOSPrevention = new expressServerToolkit.DDOSPrevention(
  "mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb",
  5000
);
// Connects the database
DDOSPrevention.connectMongo(err => {
  if (!err) {
    // Prevents DDOS, Bruteforce etc
    app.use(DDOSPrevention.prevent);
    // Express firewall currently only handles sanitize of get/post parameters
    app.use(expressServerToolkit.ExpressFirewall);
    // Handles the requests
    app.use("*", (req, res, next) => {
      // Checks the domain/hostname
      if (req.hostname === "localhost") {
        // Proxy's the request
        ProxyLocalhost.web(req, res, next);
      }
    });
  } else {
    throw err;
  }
});
I am not responsible for security breaches or any other trouble. I am developing this for self education, and it's your choise to use.

Keywords

FAQs

Package last updated on 04 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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