Skip to content

serverkur/dashactyl-block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

GeoLite2-Country.mmdb upload file to home directory

Open index.js and add them

Country Blocking will not work in all countries except the one you have added

// ipblock.

const ipgeoblock = require("ipgeoblock-fixed");

app.use(ipgeoblock({
	geolite2: "./GeoLite2-Country.mmdb",
	blockedCountries: [ "US" ]
}, function (req, res) {
	res.statusCode = 500;
	res.redirect("https://block.hellnodes.com");
}));

To block all countries and allow specific countries


	
// ipblock.

const ipgeoblock = require("ipgeoblock-fixed");

app.use(ipgeoblock({
	geolite2: "./GeoLite2-Country.mmdb",
	allowedCountries: [ "US" ]
}, function (req, res) {
	res.statusCode = 500;
	res.redirect("https://block.hellnodes.com");
}));

Don't forget to download after adding.

npm install ipgeoblock-fixed

About

Dashactyl Country Block & Allow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published