express-server-toolbox
Includes
- DDOS, Spam & Brute force protection
- Proxy server for all request/response types
- Get and Post parameters get sanitized
Example
const expressServerToolkit = require("express-server-toolkit");
const express = require("express");
const ProxyLocalhost = new expressServerToolkit.proxy(
"localhost",
8080,
"http",
3000
);
const DDOSPrevention = new expressServerToolkit.DDOSPrevention(
"mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb",
5000
);
DDOSPrevention.connectMongo(err => {
if (!err) {
app.use(DDOSPrevention.prevent);
app.use(expressServerToolkit.ExpressFirewall);
app.use("*", (req, res, next) => {
if (req.hostname === "localhost") {
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.