
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
autoft-bot-wildcard
Advanced tools
š Advanced Telegram Bot for Cloudflare Wildcard Domain Management with Telegram Notifications
š The most advanced Telegram bot for automated Cloudflare wildcard domain management
š Documentation ⢠š Quick Start ⢠š¬ Support ⢠š Issues
Get your bot running in under 3 minutes!
npm install -g autoft-bot-wildcard
autoft-bot-wildcard
cd autoft-bot-wildcard
npm start
š That's it! Your bot is now live and ready to manage wildcard domains!
# Install globally
npm install -g autoft-bot-wildcard
# Run setup wizard
autoft-bot-wildcard
# Clone repository
git clone https://github.com/AutoFTbot/Wildcard-Bot.git
cd Wildcard-Bot
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit configuration
nano .env
# Start bot
npm start
docker run -d --name autoft-bot-wildcard \
-e BOT_TOKEN=your_token \
-e ADMIN_IDS=your_id \
autoft-bot-wildcard:latest
Create a .env
file in your project root:
# š¤ Bot Configuration
BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
ADMIN_IDS=123456789,987654321
# š¢ Notifications (Optional)
TELEGRAM_GROUP_ID=-1001234567890
# š§ Optional Settings
MAX_CUSTOM_DOMAINS=5
NODE_ENV=production
LOG_LEVEL=info
Customize your bot behavior in config/default.js
:
module.exports = {
// Admin Configuration
ADMIN_IDS: [123456789, 987654321],
// Domain Limits
MAX_CUSTOM_DOMAINS: 5,
MAX_DOMAINS_PER_USER: 10,
// Available Domains
DEFAULT_DOMAINS: [
'yourdomain.com',
'example.org',
'demo.net'
],
// Notification Settings - Only Telegram supported
NOTIFICATIONS: {
TELEGRAM: {
enabled: true,
groupId: process.env.TELEGRAM_GROUP_ID || '',
},
},
// Security Settings
FORBIDDEN_KEYWORDS: [
'admin', 'root', 'api', 'mail'
],
// Rate Limiting
RATE_LIMITS: {
SETUP_WILDCARD: {
PER_USER: 3,
COOLDOWN: 3600
}
}
};
/start ā Welcome message and setup guide
/addcf <api_key> <email> ā Register Cloudflare credentials
/listdomain ā View available domains
/setupwildcard example.com ā Setup wildcard for domain
/new subdomain.example.com ā Create custom subdomain
/mysub ā View your subdomains
/analytics example.com ā View domain statistics
/clearcache example.com ā Clear Cloudflare cache
/stats ā Bot usage statistics
/userinfo 123456789 ā View user details
/broadcast Hello everyone! ā Message all users
/testnotif ā Test notification system
Command | Description | Usage |
---|---|---|
/start | Welcome message & setup guide | /start |
/help | Show all available commands | /help |
/ping | Check bot responsiveness | /ping |
Command | Description | Usage |
---|---|---|
/addcf | Add Cloudflare credentials | /addcf <api_key> <email> |
/cfconfig | View current configuration | /cfconfig |
/updatecf | Update Cloudflare credentials | /updatecf <api_key> <email> |
/deletecf | Remove configuration | /deletecf |
Command | Description | Usage |
---|---|---|
/listdomain | Show available domains | /listdomain |
/setupwildcard | Setup wildcard domain | /setupwildcard <domain> |
/new | Create custom subdomain | /new <subdomain.domain.com> |
/mysub | View your subdomains | /mysub |
/searchdomain | Search domains | /searchdomain <keyword> |
/delsub | Delete subdomain | /delsub <subdomain> |
Command | Description | Usage |
---|---|---|
/analytics | View domain statistics | /analytics <domain> |
/clearcache | Clear Cloudflare cache | /clearcache <domain> |
š BOT STATISTICS
š„ Users & Domains:
⢠Registered Users: 150
⢠Active Domains: 45
⢠Total Subdomains: 1,234
ā” System Status:
⢠Uptime: 7d 12h 30m
⢠Memory Usage: 45.2 MB
⢠Node.js Version: v20.10.0
š¤ Bot Info:
⢠Bot Username: @YourWildcardBot
⢠Last Updated: 2024-01-15 14:30:25
Send messages to all registered users:
/broadcast šØ Scheduled maintenance in 1 hour. All services will be temporarily unavailable.
Get detailed user information:
/userinfo 123456789
š¤ USER INFORMATION
š User ID: 123456789
š± Telegram: @username (John Doe)
š§ Cloudflare Email: user@example.com
š Custom Domains: 5
š
Registration: 2024-01-10 09:15:32
Add your own domains to the bot:
// config/default.js
DEFAULT_DOMAINS: [
'your-domain.com',
'another-domain.net',
'example.org'
]
Configure Telegram notifications:
NOTIFICATIONS: {
TELEGRAM: {
enabled: true,
groupId: process.env.TELEGRAM_GROUP_ID,
// Custom message templates
templates: {
welcome: 'š New user registered: {username}',
domainSetup: 'š Wildcard setup: {domain} by {user}'
}
}
}
Prevent abuse with custom rate limits:
RATE_LIMITS: {
SETUP_WILDCARD: {
PER_USER: 5, // Max 5 setups per user
COOLDOWN: 3600 // 1 hour cooldown
},
ANALYTICS: {
PER_USER: 10, // Max 10 requests per hour
COOLDOWN: 300 // 5 minutes between requests
}
}
# Install PM2 globally
npm install -g pm2
# Start bot with PM2
pm2 start index.js --name "autoft-bot-wildcard"
# Enable auto-restart on server reboot
pm2 startup
pm2 save
# Monitor logs
pm2 logs autoft-bot-wildcard
# Restart bot
pm2 restart autoft-bot-wildcard
# Set production environment
export NODE_ENV=production
# Increase memory limit if needed
node --max-old-space-size=2048 index.js
If you plan to add webhooks:
server {
listen 80;
server_name your-bot-domain.com;
location /webhook {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
autoft-bot-wildcard/
āāā š bin/
ā āāā wildcard-bot.js # CLI entry point
āāā š config/
ā āāā constants.js # Application constants
ā āāā default.js # Default configuration
āāā š handlers/
ā āāā adminHandlers.js # Admin command handlers
ā āāā cloudflareHandlers.js # Cloudflare operations
ā āāā configHandlers.js # Configuration management
ā āāā domainHandlers.js # Domain operations
ā āāā generalHandlers.js # General bot commands
āāā š lib/
ā āāā WildcardBot.js # Main bot class
āāā š services/
ā āāā CloudflareManager.js # Cloudflare API wrapper
ā āāā NotificationService.js # Notification system
āāā š utils/
ā āāā fileUtils.js # File operations
ā āāā systemUtils.js # System utilities
ā āāā validation.js # Input validation
āāā š data/ # Bot data storage
āāā .env.example # Environment template
āāā index.js # Application entry point
āāā package.json # Dependencies
āāā README.md # Documentation
# Clone repository
git clone https://github.com/AutoFTbot/Wildcard-Bot.git
cd Wildcard-Bot
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Edit configuration
nano .env
# Start in development mode
npm run dev
# Run linter
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run format
# Run all checks
npm run check
# Test configuration
npm run test:config
# Test notifications
npm run test:notifications
# Test Cloudflare connection
npm run test:cloudflare
A: Message @BotFather on Telegram, use /newbot
command, and follow the instructions.
A: Go to Cloudflare Dashboard ā My Profile ā API Tokens ā Global API Key ā View
A: Message @userinfobot on Telegram to get your user ID.
A: Yes! Add your domains to the DEFAULT_DOMAINS
array in config/default.js
.
A: You can configure limits in config/default.js
. Default is 5 domains per user.
A: Run npm update -g autoft-bot-wildcard
for global installations.
This happens when the global installation didn't complete properly:
# Reinstall globally
npm install -g autoft-bot-wildcard --force
# Clear npm cache if needed
npm cache clean --force
# Check if command is available
which autoft-bot-wildcard
# Alternative: run directly with npx
npx autoft-bot-wildcard
# Check if bot is running
ps aux | grep node
# Check logs
pm2 logs autoft-bot-wildcard
# Restart bot
pm2 restart autoft-bot-wildcard
.env
file1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
TELEGRAM_GROUP_ID
in environment variablesnpm cache clean --force
npm install -g npm@latest
Enable detailed logging:
export LOG_LEVEL=debug
npm start
We welcome contributions! Here's how you can help:
git checkout -b feature/amazing-feature
npm run lint
)git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 AutoFTbot Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
ā If this project helped you, please give it a star!
Made with ā¤ļø by the AutoFTbot Team
š Get Started Now ⢠š Read the Docs ⢠š¬ Join Community
FAQs
š Advanced Telegram Bot for Cloudflare Wildcard Domain Management with Telegram Notifications
The npm package autoft-bot-wildcard receives a total of 13 weekly downloads. As such, autoft-bot-wildcard popularity was classified as not popular.
We found that autoft-bot-wildcard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.