An advanced tool to scan and identify clean, filtering-compatible domains and IP addresses for use with Reality and major CDN providers such as Fastly and Cloudflare.
This utility helps detect clean internet resources unaffected by filtering (e.g., in Iran), offering a powerful REST API with a modern, responsive web UI.
- π Automatic & manual scanning of domains and IPs from user input or public sources
- π Domain validation via port 443 (HTTPS), TLS handshake, and certificate inspection
- π‘ IP verification including:
- Ping and TCP port 443 check
- WHOIS lookup to verify CDN ownership
- TLS SNI handshake to ensure compatibility
- π₯ CIDR support & dynamic IP sources via JSON and live APIs
- π₯οΈ FastAPI backend with live RESTful endpoints
- π Real-time progress reporting and cancellation support
- π§ͺ Designed for regional testing (e.g., filtering in Iran)
- π‘ Easily extendable to support more CDNs or custom sources
- Python 3.9 or higher
pip(Python package manager)- (Optional) Node.js & npm β for frontend development or bundling assets
- Internet access β for domain/IP testing and retrieving external sources
You can view a working demo of the project here:
git clone https://github.com/MAPSIM-co/Mapsim_Scanner_Utility.git
cd Mapsim_Scanner_Utilitypython3 -m venv venv
source venv/bin/activate- For Windows
venv\Scripts\activatepip install -r requirements.txt
uvicorn backend.main:app --reload-
π You can open the UI in your browser via:
http://localhost:<your-port>/index.html -
βΉοΈ Make sure to read the Web Server section for details on running a local server.
-
The
server runsby default at http://localhost:8000 -
API
docsavailable at http://localhost:8000/docs
Open frontend/index.html in your web browser
If you change the API server address, update the BASE_URL variable in frontend/app.js accordingly
To run the frontend UI correctly, you must serve the frontend folder using a web server.
Do NOT open index.html directly from your file system (file://) β it will break due to CORS restrictions.
cd frontend
python3 -m http.server 8080Open in browser:
http://localhost:8080/index.htmlnpm install -g http-server
cd frontend
http-server -p 8080Open in browser:
http://localhost:8080/index.htmlπ‘ If you change API address, update BASE_URL in frontend/app.js
Open Command Prompt (CMD)
Navigate to the frontend folder:
cd path\to\Mapsim_Scanner_Utility\frontendRun:
python -m http.server 8080Open:
http://localhost:8080/index.htmlTo serve the frontend/index.html on bash http://localhost:<your-port> , you can use any of the following free web servers depending on your operating system:
| Tool | Description |
|---|---|
| XAMPP | All-in-one Apache + PHP + MySQL stack. Easy to install and use. π |
| WampServer | Apache + PHP + MySQL for Windows only. Simple UI. π |
| Laragon | Modern and lightweight web server with support for Apache/Nginx. π |
| Python HTTP Server | Built-in in Python. For static files only: python -m http.server |
| Node.js http-server | Install via npm: npm install -g http-server, then run http-server ./frontend |
| Tool | Description |
|---|---|
| MAMP | macOS alternative to XAMPP. Includes Apache, PHP, MySQL. π |
| Python HTTP Server | Comes with macOS. Run in terminal: python3 -m http.server |
| Node.js http-server | Static server with Node.js: Install via npm install -g http-server and run in folder |
| Caddy | Modern CLI web server with auto HTTPS (optional). π |
| Nginx (via Homebrew) | Install with: brew install nginx, then configure /usr/local/etc/nginx/nginx.conf for local serving |
| Tool | Description |
|---|---|
| Apache2 | Full-featured HTTP server. Install with: sudo apt install apache2 |
| Nginx | Lightweight and efficient. Install with: sudo apt install nginx |
| Python HTTP Server | Quickest for static content. Run in terminal: python3 -m http.server |
| Node.js http-server | Simple static server. Install via npm install -g http-server |
| Caddy | Easy to configure and powerful with HTTPS. π |
For most users, simply open a terminal in the frontend/ folder and run:
python3 -m http.serverThen open
http://localhost:<your-port>/index.html
in your browser.
Mapsim Scanner Utility/
βββ backend/ # FastAPI backend logic and scanning modules
β βββ __init__.py # Marks this directory as a Python package
β βββ main.py # FastAPI app instance and route definitions
β βββ utils.py # Core logic for domain/IP scanning and validation
β βββ sources.py # Management of domain/IP sources and static ranges
β βββ data/ # Data directory for domain/IP source lists
β βββ domain_sources.json # JSON list of Reality-compatible domain source URLs
β βββ ip_sources.json # JSON list of IP source URLs (e.g., from Fastly API)
β βββ fastly_ranges.json # Static IP ranges (CIDR blocks) for Fastly
β βββ cloudflare_ranges.json # Static IP ranges (CIDR blocks) for Cloudflare
β
βββ frontend/ # Static frontend files for browser UI
β βββ index.html # Main user interface with layout and inputs
β βββ app.js # JavaScript logic for interacting with API and UI updates
β βββ style.css # Basic styling for the web interface
β
βββ requirements.txt # Python package dependencies for backend
βββ README.md # Project description, usage, and documentation
βββ .gitignore # Git ignore rules (e.g. for __pycache__, .env files, etc.)- Click "Start Auto Scan Domains"
- View progress and clean domains found
- Cancel anytime with the Cancel button
- Enter domain names line-by-line
- Click Manual Scan
- Results show valid domains usable with Reality
- Select provider:
FastlyorCloudflare - Set required count of clean IPs
- Toggle
TLScheck if needed - Click Start, monitor results live
- Paste IP addresses line-by-line
- Toggle
TLScheck - Click Manual IP Scan
Use the download buttons to get clean domains/IPs as .txt files
- For accurate filtering test, use an IP located inside Iran
- Keep
domain_sources.jsonandip_sources.jsonup to date - For better accuracy, ensure:
DNSis not hijacked- Connections arenβt intercepted by proxies or filters
- You can add your own CDN ranges or source URLs in the
data/directory
Contributions are welcome!
- π Add support for more
CDNproviders - π§ Improve scanning logic or heuristics
- π¨ Enhance the frontend design
- π Report bugs via GitHub Issues
- Please submit pull requests with clear changes and documentation.
This project is licensed under the MIT License β feel free to use and modify with attribution
For support, questions, or collaboration:
- GitHub Issues
- Telegram : (Support Telegram)