Skip to content

Repository files navigation

🌐 Universal Smart Router Admin Panel & Wi-Fi Bandwidth Controller

(Universal Open-Source Gateway Dashboard with Anti-Hotspot Shield & Real-Time Traffic Engine)

Release Downloads Stars Forks Python License: MIT Platform


🌟 Overview

The Universal Smart Router Admin Panel is a next-generation, high-performance web dashboard that connects with any local Wi-Fi router or fiber gateway.

Whether your network uses a Huawei EchoLife ONT (192.168.100.1), TP-Link (192.168.0.1), Tenda (192.168.1.1), Netgear, D-Link, MikroTik, or OpenWrt β€” simply launching start_dashboard.bat automatically discovers your default gateway, probes the router brand, and displays an intuitive Router Setup & Login Interface to manage your entire network.


πŸš€ Key Features

1. πŸ” Automated Network & Gateway Discovery

  • Eliminates hardcoded IP addresses (192.168.100.1, 192.168.1.1, 192.168.0.1, 10.0.0.1).
  • Dynamically retrieves the default gateway IP and host IP using OS routing tables (route print, Get-NetRoute, ip route show default).
  • Inspects gateway HTTP responses to identify the exact router vendor and hardware signature (Huawei, TP-Link, Tenda, Netgear, MikroTik, Generic).

2. πŸ” Dynamic Router Login & Universal Fallback

  • Access the Router Setup Modal at startup or anytime by clicking the router badge in the top navigation bar.
  • Configure custom Gateway IP, Admin Username, and Password.
  • Pre-Flight Verification: Validates login credentials prior to saving.
  • Universal Mode: Operates seamlessly via local ARP table analysis and hardware NIC counters even if direct router web login is unavailable.

3. ⚑ Real-Time Hardware Speed Monitoring & ISP Speed Test

  • Hardware NIC Monitoring (psutil): Accurately measures physical network interface byte throughput.
  • Integrated Speed Test: 1-click speed test powered by global Cloudflare edge servers:
    • Download Speed (Mbps)
    • Upload Speed (Mbps)
    • Latency / Ping (ms)
  • Automatically synchronizes dashboard capacity gauges and QoS baselines upon test completion.

4. πŸŽ›οΈ Granular Per-Device Bandwidth Allocation

  • Assign independent Download Speed Limits (Mbps) and Upload Speed Limits (Mbps) to individual connected devices.
  • Example allocations:
    • Primary Workstation / PC: Full Line Speed (VIP Priority)
    • Smartphone 1: 2.0 Mbps Download / 0.5 Mbps Upload
    • Smartphone 2: 1.0 Mbps Download / 0.2 Mbps Upload
    • Smart TV: 5.0 Mbps Download / 1.0 Mbps Upload
  • Prevents single devices from monopolizing network bandwidth.

5. πŸ›‘οΈ Anti-Hotspot & Wi-Fi Tethering Shield

  • Detects secondary Wi-Fi hotspots and mobile AP bridges created by connected smartphones or laptops:
    • NAT TTL Hop Inspection: Identifies packets that have traversed a secondary NAT layer.
    • Downstream Hierarchy Visualizer: Displays secondary tethered devices connected behind the hotspot host.
    • Auto-Block: Automatically blacklists offending devices via the hardware WLAN MAC Filter.
    • Starve / Throttle: Restricts unauthorized sharing devices to 0.1 Mbps.

6. πŸ“Š Interactive Network Topology & Usage Leaderboard

  • Real-time topology map: Internet Cloud β†’ Gateway ONT β†’ Wi-Fi SSIDs / LAN Ports β†’ Connected Devices.
  • Tracks daily and cumulative data consumption (MB / GB) in a persistent SQLite database (data_usage.db).
  • Displays a real-time Top 5 Bandwidth Consumers leaderboard.

πŸ’» Quick Start Guide

Option 1: Standalone Windows App (No Python Required - Recommended for End Users)

If you don't have Python installed or want a portable 1-click experience:

  1. Go to the GitHub Releases page.
  2. Download the latest SmartRouterAdmin-v1.0.0-Windows.zip.
  3. Extract the folder and double-click Launch_SmartRouterAdmin.bat (or SmartRouterAdmin.exe).
  4. The dashboard will automatically launch and open in your default browser at http://localhost:8080!

Option 2: 1-Click Launch with Python on Windows

If you have Python 3.9+ installed:

  1. Clone or download this repository.
  2. Double-click start_dashboard.bat.

The script will automatically:

  • Verify Python and auto-install required dependencies (flask, requests, psutil).
  • Discover your network's default gateway and identify your router vendor.
  • Launch the web server and open http://localhost:8080 in your default browser.

Option 3: Manual Start (Windows / Linux / macOS)

  1. Clone repository:

    git clone https://github.com/codocraft/smart-router-admin.git
    cd smart-router-admin
  2. Install dependencies:

    pip install -r requirements.txt
  3. Start server:

    python app.py
  4. Open browser: πŸ‘‰ http://localhost:8080


πŸ“± Mobile & Local Network Access

Access the admin panel from any smartphone, tablet, or laptop on your Wi-Fi network:

  1. Check your computer's local IP address (ipconfig on Windows, e.g. 192.168.100.199).
  2. Open your mobile browser (Chrome, Safari, Firefox): πŸ‘‰ http://192.168.100.199:8080

πŸ“ Project Structure

smart-router-admin/
β”‚
β”œβ”€β”€ start_dashboard.bat     # 1-Click Windows Launcher with auto-discovery
β”œβ”€β”€ build_protected_exe.bat # Standalone binary compiler (PyInstaller packaging)
β”œβ”€β”€ requirements.txt        # Python dependencies (Flask, Requests, Psutil)
β”œβ”€β”€ app.py                  # Main Flask Web Server & REST API endpoints
β”œβ”€β”€ license_guard.py        # Anti-tampering & integrity verification core
β”œβ”€β”€ network_discovery.py    # Auto-detection of Gateway IP, Local IP & Router Brand
β”œβ”€β”€ router_bridge.py        # Router hardware interface (Huawei, TP-Link, ARP fallback)
β”œβ”€β”€ traffic_engine.py       # Live NIC hardware metrics, speedtest, anti-hotspot forensics
β”œβ”€β”€ database.py             # SQLite WAL-mode database (per-device data & settings)
β”‚
β”œβ”€β”€ templates/
β”‚   └── index.html          # Modern Glassmorphic Admin Dashboard & Modals
β”‚
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css       # Dark glassmorphism, responsive grid, status badges
β”‚   └── js/
β”‚       └── app.js          # Live polling, speed test, setup modal, charts & filters
β”‚
└── README.md               # Complete English Documentation

πŸ” Supported Routers & Authentication

Router Brand / Model Mode Features Supported
Huawei EchoLife GPON ONT (HS8145C, HG8245, etc.) Full Superadmin API Hardware MAC Filter, Multi-SSID QR, Optical Fiber RX/TX, Reboot
TP-Link / Tenda / Netgear / D-Link Universal / HTTP Bridge Auto-Gateway Discovery, Device Tracking, Bandwidth Shaping
Any Router / Generic Wi-Fi Universal ARP Mode Auto-Gateway, Real Hardware Speed Test, Per-Device Limits, Anti-Hotspot

❓ Frequently Asked Questions (FAQ)

Q1: Does this require manual code modification for different router brands?

Answer: Not at all. The network discovery engine automatically identifies your gateway IP (e.g. 192.168.1.1 or 192.168.0.1) and prompts you with the configuration modal.

Q2: How does the real-time speed test work?

Answer: Clicking "Test Real Speed" triggers a multi-stage latency and throughput test against global Cloudflare edge endpoints, recording real download, upload, and ping metrics directly into your dashboard.

Q3: Can bandwidth limits be set independently for each device?

Answer: Yes. Under the "Speed Booster & QoS" tab, download and upload caps can be configured independently per device.


⭐ Support This Project

If you find Smart Router Admin useful, please consider giving it a Star (⭐) on GitHub!

  • It helps more network administrators and home users discover this project.
  • It inspires continued development of new router protocols (MikroTik, ASUS, OpenWrt).

πŸ‘‰ Click here to Star the repository


🏷️ Search Keywords & Indexing Tags

router-admin-panel β€’ bandwidth-limiter-windows β€’ wifi-speed-controller β€’ anti-hotspot-shield β€’ huawei-echolife-admin β€’ tplink-router-tools β€’ per-device-speed-limit β€’ network-traffic-monitor β€’ cloudflare-speedtest-integration β€’ lan-bandwidth-throttler β€’ smart-router-dashboard β€’ python-flask-network β€’ codocraft-solutions


πŸ›‘οΈ Developer Attribution & Security Core

This software is developed and maintained by Codocraft Solutions.

Develop by Codocraft Solutions
Official Website: https://codocraft.com

πŸ” Multi-Tier Anti-Tamper & Binary Protection:

  1. Self-Integrity Guard (license_guard.py): Continuously verifies developer attribution on startup, during API requests, and through a background watchdog daemon. Any modification or removal of the URL or brand name causes an unrecoverable process crash (os._exit(1)).
  2. Frontend DOM Sentinel (app.js): Real-time MutationObserver and periodic watchdog monitor the DOM; tampering wipes the UI and terminates the server backend.
  3. Standalone Binary Compilation (build_protected_exe.bat): Run build_protected_exe.bat to compile the entire Python project into a standalone .exe binary. This ensures end-users cannot view or edit your Python source code.

Develop by Codocraft Solutions. All Rights Reserved.

Releases

Packages

Contributors

Languages