Add Cloudflare Domain Detector with datacenter location

Features:
- Scan all domains on server for Cloudflare usage
- Check single domain with detailed analysis
- Detects Cloudflare via: nameservers, IP ranges, HTTP headers
- Shows Cloudflare datacenter location (IATA code from CF-RAY)
- Useful for debugging regional outages and cache issues

Detection Methods:
1. Nameserver check (*.cloudflare.com)
2. IP address check (Cloudflare IP ranges)
3. HTTP header check (CF-RAY, Server: cloudflare)
4. Datacenter location extraction (e.g., ORD, LAX, LHR)

Output shows:
- Domains using Cloudflare [with datacenter code]
- Domains NOT using Cloudflare
- Unknown/uncertain domains

Integrated into Website Diagnostics Menu (option 4)

Example output:
  ✓ pickledperil.com                                [BNA]
  • example.com
This commit is contained in:
cschantz
2026-01-27 17:37:55 -05:00
parent dd585493b8
commit c962fe56e7
2 changed files with 533 additions and 0 deletions
+5
View File
@@ -196,6 +196,10 @@ show_website_menu() {
echo ""
echo -e " ${BLUE}3)${NC} 📦 WordPress Tools → WP-Cron manager & diagnostics"
echo ""
echo -e "${BOLD}Domain Analysis:${NC}"
echo ""
echo -e " ${BLUE}4)${NC} 🔶 Cloudflare Detector - Which domains use Cloudflare + location"
echo ""
echo -e " ${RED}0)${NC} Back to Main Menu"
echo ""
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
@@ -211,6 +215,7 @@ handle_website_menu() {
1) run_module "website" "website-error-analyzer.sh" ;;
2) run_module "website" "500-error-tracker.sh" ;;
3) bash "$MODULES_DIR/website/wordpress-menu.sh" ;;
4) run_module "website" "cloudflare-detector.sh" ;;
0) return ;;
*) echo -e "${RED}Invalid option${NC}"; sleep 1 ;;
esac