domnex
v1.0.0
Published
Domnex - Remote website control system using Excel + domain
Maintainers
Readme
Domain Site Guard 🛡️ (Domnex)
Enterprise-Grade Remote Website Control & Security System
"Turn your Excel sheet into a real-time kill switch for your web properties."
Domain Site Guard (npm: domnex) is a powerful, "draconian" security library that allows you to control the status of your websites remotely using a simple Excel sheet. It utilizes a Client-Server Hybrid Architecture for maximum enforcement.
🚀 Key Features
- Excel Live Control: Update site status by editing
excel/rules.xlsx(User) orexcel/master.xlsx(Owner). - Master Override: Rules in
master.xlsxtake precedence, allowing the package owner to forcefully secure domains. - Hybrid Security:
- Server Middleware: Blocks requests before they hit the browser (403/503).
- Client Enforcer: Applies visual overlays, hides features, or locks the UI.
- Feature Flags: Hide Payments, Auth, or Uploads remotely without code changes.
- Security Lockdown:
cursor: none,consoledisabled, and full page blocking.
📦 Installation
npm install domnex🛠️ Usage
1. Server-Side (Middleware)
Use this in your Node.js/Express app to block compromised domains at the source.
import express from "express";
import { siteGuardMiddleware } from "domnex/src/guard.js";
const app = express();
// Protect your app
app.use(siteGuardMiddleware());2. Client-Side (UI Effects)
Use this to show overlays (Warnings, Maintenance, Countdown) or lock the browser.
import DomainGuard from "domnex";
// Initialize (Auto-fetches rules.lock created by the watcher)
// You must serve the 'rules.lock' file publicly or via API
new DomainGuard("/path/to/rules.lock").init();3. Start the Live Controller
Run this process in the background. It watches your Excel file and updates the config.
npm run watch🚦 Status Codes Reference
| Code | Name | Level | Effect |
| :------ | :------------------- | :---------- | :------------------------------------------------------------- |
| 0 | NORMAL | 🟢 Safe | Everything works. |
| 1 | HACKED | 🔴 Critical | Server Block (403) + Client Black Screen. |
| 2 | MISUSED | 🟡 Warn | Sticky yellow warning banner. |
| 3 | READ_ONLY | 🟡 Warn | Disables inputs/buttons (pointer-events). |
| 4 | API_DOWN | 🟠 High | Server Block (503) for /api requests. |
| 5 | MAINTENANCE | 🔵 Info | Server Block (503) + Maintenance Page. |
| 6 | DEGRADED | 🟡 Warn | "Service Degraded" banner. |
| 7 | DDOS | 🟠 High | Server Rate Limit (429 API) + Fake "Browser Check" Screen. |
| 8 | BOT_TRAFFIC | 🟠 High | Server Rate Limit (429 API) + Fake "Browser Check" Screen. |
| 9 | LICENSE_INVALID | 🔴 Critical | Server Block (403). |
| 10 | PAYMENTS_OFF | 🟣 Feature | Hides .payment, .checkout, .billing elements. |
| 11 | AUTH_DISABLED | 🟣 Feature | Hides .login, .signup, .register elements. |
| 12 | UPLOADS_OFF | 🟣 Feature | Hides file inputs. |
| 13 | SOFT_MAINTENANCE | 🔵 Info | "Updates in Progress" banner. |
| 14 | COMING_SOON | 🔵 Info | Server Block (503) + "Coming Soon" Page. |
| 15 | SUNSET_MODE | 🔵 Info | Server Block (503) + Countdown Page. |
| 16 | FREE_MODE | 🟣 Tier | Blurs .premium-content + "Free Tier" banner. |
| 17 | PREMIUM_ONLY | 🟣 Tier | Blurs content + "Premium Only" banner. |
| 18 | GEO_BLOCKED | 🔴 Critical | Server Block (403) for restricted regions. |
| 19 | FEATURE_LIMITED | 🟣 Tier | Hides .pro-feature elements. |
| 20 | CURSOR_LOCK | 🟣 Nuisance | cursor: none + swallows mouse events. |
| 99 | SECURE_LOCK | 🔒 Stealth | Disables console methods. |
| 100 | ULTRA_LOCK | ☢️ Nuclear | ALL OF THE ABOVE (Server Block + Client Lock). |
⚠️ Disclaimer
This library provides administration and compliance tools. While server-side blocking is secure, client-side visual effects (like hiding elements) can be bypassed by knowledgeable users. Use Server-Side status codes (1, 4, 5, 9, 100) for true security.
License
MIT
