⚡ Domain Reality Checker Bot — an advanced Telegram bot based on Python and Aiogram library for checking domains for suitability
- 🎯 Contextual responses — results appear in the relevant topic
- 📱 Organization — discussions don't mix between topics
- 🔄 Support for all commands — prefix commands, mentions, and replies work
- In groups, the bot always responds via reply to the original message
- A brief report is sent to save space in chat
- A "📄 Full Report in DM" button is added to brief reports
- Full reports are automatically sent to DM of the user
- Command
!full domain.comin group → full report comes to DM - "📄 Full Report in DM" button → smart bot link with automatic query
- Security: deep link works for any user
💡 How it works: The button contains a link like https://t.me/botname?start=full_domain.com, which will automatically open the bot and request a full report. No prior setup is required!
| Chat Type | Brief Report | Full Report | Button |
|---|---|---|---|
| Direct Messages | In the same chat | In the same chat | "Full Report" |
| Groups/Supergroups | Reply in group | Sending to DM | "📄 Full Report in DM" |
| Topics in Supergroups | Reply in topic | Sending to DM | "📄 Full Report in DM" |
🚀 Quick Start with Dockereality/VLESS Proxy. The bot works asynchronously, uses Redis for task queue management and result caching, and provides brief and full reports on domain checks.
- Exponential backoff with configurable jitter
- Automatic retries for Redis, Telegram API, and domain checks
- Flexible configuration of timeout and number of attempts
- Automatic progress bar for checking 3+ domains
- Batch processing of 3 domains at a time for optimization
- Detailed execution statistics (successful, from cache, errors)
- Collection of metrics on bot usage and domain checks
- Detailed reports for the administrator (/analytics)
- Tracking of popular domains and user activity
- Group authorization via environment variables
- Automatic exit from unauthorized groups
- Flexible management of the allowed groups list
- Smart replies in the same topic where the bot was mentioned
- Contextual work with Telegram topics
- Organized communication in large groups
- Prefix commands (!check, !full, !help)
- Bot mentions (@botname domain.com)
- Replies to bot messages with new domains
- Configurable command prefix
- Smart replies in groups: brief reports with reply + "Full in DM" button
- Full reports in DM: automatic sending of full reports to direct messages
The bot performs a comprehensive domain check and returns a report including:
- 🌐 DNS: A-record (IPv4) resolution
- 📡 Port scan: Checking open TCP ports (80, 443, 8443)
- 🌍 Geography and ASN: IP geolocation, ASN, and provider
- 🚫 Spamhaus: IP check in Spamhaus blacklists
- 🟢 Ping: Latency to the server (in milliseconds)
- 🔒 TLS: TLS version (e.g., TLSv1.3), cipher, certificate validity
- 🌐 HTTP: HTTP/2 and HTTP/3 support, TTFB (time to first byte), redirects, server, presence of WAF and CDN
- 📄 WHOIS: Domain expiration date
- 🛰 Suitability assessment: Verdict on whether the domain is suitable for Reality (considers absence of CDN, HTTP/2 support, TLSv1.3, and ping < 50 ms)
🔍 Check: 35photo.pro:443
✅ A: 185.232.233.233
🟢 Ping: ~25.0 ms
🔒 TLS
✅ TLSv1.3 supported
🌐 HTTP
❌ HTTP/2 not supported
❌ HTTP/3 not supported
🟢 WAF not detected
🟢 CDN not detected
🛰 Suitability assessment
❌ Not suitable: HTTP/2 missing
[Full report]
🔍 Check: google.com:443
🌐 DNS
✅ A: 142.250.74.14
📡 Port scan
🟢 TCP 80 open
🟢 TCP 443 open
🔴 TCP 8443 closed
🌍 Geography and ASN
📍 IP: SE / Stockholm County / Stockholm
🏢 ASN: AS15169 Google LLC
✅ Not found in Spamhaus
🟢 Ping: ~7.7 ms
🔒 TLS
✅ TLSv1.3 supported
✅ TLS_AES_256_GCM_SHA384 used
⏳ TLS certificate expires in 65 days
🌐 HTTP
✅ HTTP/2 supported
✅ HTTP/3 (h3) supported
⏱️ TTFB: 0.13 sec
🔁 Redirect: https://www.google.com/
🧾 Server: Google Web Server
🟢 WAF not detected
⚠️ CDN detected: Google
📄 WHOIS
📆 Expiration date: 2028-09-14T04:00:00
🛰 Suitability assessment
❌ Not suitable: CDN detected (Google)
/start— Greeting and main menu/check <domain>— Brief domain check/full <domain>— Full domain check/mode— Toggle output mode (brief/full)/history— Show last 10 checks
!check <domain>— Brief check in group!full <domain>— Full check in group!help— Help with commands in group@botname <domain>— Mention the bot for checking- Reply to the bot's message with a new domain
/adminhelp— List of all admin commands/reset_queue— Reset the check queue/clearcache— Clear result cache/analytics— Show usage analytics/groups— Manage authorized groups/groups_add <ID>— Add group to authorized/groups_remove <ID>— Remove group from authorized/groups_current— Show current group ID
A complete command template for setup in @BotFather is in the file BOTFATHER_COMMANDS.txt.
/setcommands
start - 🚀 Launch the bot and show the menu
check - 🔍 Brief domain check
full - 📄 Full domain check
mode - ⚙️ Toggle output mode
history - 📜 Show recent checks
/setdescription
Bot for checking domains for suitability for Reality/VLESS proxy. Checks DNS, TLS, HTTP/2, ping, WHOIS and issues brief/full reports. Supports group operation with smart replies.
- Group mode: Enable the ability to add to groups
- Privacy:
ENABLED(the bot sees only commands and mentions) - Inline mode: Optional for extended functionality
💡 Full list of commands and settings see in BOTFATHER_COMMANDS.txt
BOT_TOKEN=your-telegram-bot-token # Bot token from @BotFather
ADMIN_ID=123456789 # Administrator ID
REDIS_HOST=redis # Redis host
REDIS_PORT=6379 # Redis port
REDIS_PASSWORD= # Redis password (optional)GROUP_MODE_ENABLED=true # Enable group operation
GROUP_COMMAND_PREFIX=! # Command prefix in groups
GROUP_OUTPUT_MODE=short # Output mode in groups: short (brief) or full (detailed)
AUTHORIZED_GROUPS=-1001234567890,-1009876543210 # IDs of authorized groups
AUTO_LEAVE_UNAUTHORIZED=false # Automatically leave unauthorized groups
BOT_USERNAME=your_bot_username # Bot username for deep linksSAVE_APPROVED_DOMAINS=false # Save the list of suitable domainsAdd the bot to the group and use the command:
/groups_current
Add the ID to the environment variable:
AUTHORIZED_GROUPS=-1001234567890,-1009876543210To automatically exit from unauthorized groups:
AUTO_LEAVE_UNAUTHORIZED=trueThe bot automatically determines the topic in which it was mentioned and replies in it:
- 🎯 Contextual responses — results appear in the relevant topic
- 📱 Organization — discussions don't mix between topics
- 🔄 Support for all commands — prefix commands, mentions, and replies work
-
Make sure Docker and Docker Compose are installed.
-
Create a
.envfile with the Telegram bot token received from@BotFather:echo "BOT_TOKEN=your-telegram-bot-token" > .env
-
Create a
docker-compose.ymlfile:services: bot: container_name: domain-bot image: ghcr.io/dignezzz/bot-reality:latest command: python bot.py environment: - BOT_TOKEN=${BOT_TOKEN} - REDIS_HOST=redis - REDIS_PORT=6379 depends_on: - redis restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health"] interval: 30s timeout: 5s retries: 3 logging: driver: json-file options: max-size: "10m" max-file: "3" compress: "true" worker: container_name: domain-worker image: ghcr.io/dignezzz/bot-reality:latest command: python worker.py environment: - BOT_TOKEN=${BOT_TOKEN} - REDIS_HOST=redis - REDIS_PORT=6379 depends_on: - redis restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health"] interval: 30s timeout: 5s retries: 3 deploy: replicas: 3 logging: driver: json-file options: max-size: "10m" max-file: "3" compress: "true" redis: container_name: domain-redis image: redis:7 restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 5 logging: driver: json-file options: max-size: "5m" max-file: "2" compress: "true"
-
Start the containers:
docker compose up -d
-
Check the logs to confirm the start:
docker compose logs -f
- 10 checks per minute per user
- 100 checks per day per user
- Automatic blocking when exceeding limits
- 5+ violations → temporary blocking
- Progressive time-outs: 1 min → 5 min → 15 min → 1 hour
- Automatic lifting of blocks after the time expires
- Asynchronous processing for high throughput
- Redis caching of results for 1 hour
- Batch processing for multiple checks
- Automatic retries on failures
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Telegram │───▶│ Bot │───▶│ Redis │
│ Updates │ │ (bot.py) │ │ Queue │
└─────────────┘ └─────────────┘ └─────────────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Analytics │ │ Worker │
│ Collector │ │ (worker.py) │
└─────────────┘ └─────────────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Metrics │ │ Domain │
│ Storage │ │ Checker │
└─────────────┘ └─────────────┘
bot.py— main bot logic and command handlingworker.py— worker for performing domain checkschecker.py— domain checking module (DNS, TLS, HTTP, etc.)redis_queue.py— managing task queue in Redisretry_logic.py— retry logic system with exponential backoffprogress_tracker.py— progress bars and batch processinganalytics.py— collection and analysis of usage metrics
- Python 3.9+
- Redis 6.0+
- Docker & Docker Compose
-
Clone the repository:
git clone https://github.com/DigneZzZ/bot-reality.git cd bot-reality -
Create a virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables in
.env -
Start Redis:
docker run -d -p 6379:6379 redis:7
-
Run the bot and worker:
python bot.py & python worker.py
- Install Python 3.11+ and Redis.
- Clone the repository:
git clone https://github.com/dignezzz/bot-reality.git cd bot-reality - Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
- Set up environment variables:
export BOT_TOKEN=your-telegram-bot-token export REDIS_HOST=localhost export REDIS_PORT=6379
- Run the bot:
python bot.py
- In a separate terminal, run the worker:
python worker.py redis-cli --version
# Status of containers
docker-compose ps
# Logs of all services
docker-compose logs -f
# Logs of a specific service
docker-compose logs -f bot
docker-compose logs -f worker
# Monitoring Redis
docker exec -it domain-redis redis-cli monitor- Command
/analytics— detailed analytics for the administrator - Automatic collection of metrics by users and domains
- Performance and error tracking
We welcome contributions to the development of the project!
- Fork the repository
- Create a branch for the new feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Use GitHub Issues to report bugs
- Provide a detailed description of the problem
- Include logs and steps to reproduce
This project is licensed under the MIT License. See the LICENSE file for details.
- Aiogram — modern asynchronous library for Telegram Bot API
- Redis — fast in-memory data store
- Docker — containerization and orchestration
- OpenAI — AI assistant in development
- OpeNode.xyz — project support
- 🌐 Web interface for bot management
- 📊 Advanced analytics with graphs
- 🔄 API for integration with external services
- 🎯 Machine learning for improved domain assessment
- 🔒 Additional security checks
🌟 If the project was helpful, please give it a star!
Made with ❤️ by DigneZzZ and AI
aiogram: Asynchronous framework for Telegram bots.redis: Client for interacting with Redis.httpx,h2: Checking HTTP/2 and HTTP/3.requests,python-whois: Requests to external APIs and WHOIS.ping3,dnspython: Ping and DNS requests.aiohttp: Asynchronous HTTP requests.
Full list in requirements.txt.
Find the bot on Telegram and start interacting:
/start: Welcome message with inline buttons./check <domain>: Brief report (e.g.,/check example.com)./full <domain>: Full report (e.g.,/full example.com)./ping: Check bot availability./history: Last 10 user checks.
- Send the domain directly:
example.com(brief report). - Send multiple domains separated by comma or newline:
example.com, google.com - Click the inline button "Full Report" to get a detailed result.
- Speed: 10 checks per 30 seconds.
- Daily limit: 100 checks per user.
- Penalties: Incorrect requests may lead to temporary blocking (from 1 minute to 1 hour).
To prevent Redis crashes, configure the Linux kernel parameter:
sudo sysctl vm.overcommit_memory=1
echo "vm.overcommit_memory=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -pLogs are stored in files:
bot.log: Bot logs.worker.log: Worker logs.checker.log: Checking logs.redis_queue.log: Queue logs.
Docker logs are limited to 10 MB (3 files with compression).
- Bot and workers: Check
/healthon port 8080 (every 30 seconds). - Redis: Check
redis-cli ping(every 10 seconds).
Docker images are automatically built and published to GitHub Container Registry via GitHub Actions. Configuration in .github/workflows/docker.yml.
- Keep
BOT_TOKENin.envand don't publish it. - Use environment variables instead of hard-coded values.
- Regularly update dependencies (
pip install -r requirements.txt --upgrade).
- Clone the repository:
git clone https://github.com/dignezzz/bot-reality.git cd bot-reality - Copy
.env.sampleto.envand configure:cp .env.sample .env nano .env
- Build and start:
docker compose up --build -d
Developed by neonode.cc. License: MIT. Contact for feedback or suggestions!