Universal Router
Easier way to add routing functionality on top of the socks5 webserver.
const { createServer } = require("@outtacontrol/socks");
const { createRouter } = require("./lib/index");
const { blacklist } = require("./lib/validators/blacklist");
const app = createRouter();
app.use(blacklist(['example1.com', 'example2.com:80']));
const server = createServer({ auths: [auth.None()] }, app.getHandler());
server.listen(1080, "localhost", () => {
console.log("socks5 router is listening on port 1080");
});