Skip to content
Β 
Β 

Latest commit

Β 

History

42 Commits

Folders and files

Repository files navigation

Cloudflare Network Diagnostic Tool v1.0 (Pre-release)


πŸš€ Overview

The Cloudflare Network Diagnostic Tool is a high-precision, privacy-first diagnostic engine designed to give users real insight into their network performance.

Built for:

  • πŸ”§ Network engineers
  • ⚑ Power users
  • πŸ‘¨β€πŸ’» Developers
  • πŸ”’ Security analysts
  • πŸ‘₯ Everyday users who want clarity

Privacy Promise

βœ… All processing happens on-device
βœ… No tracking
βœ… No analytics
βœ… No external servers
βœ… No data collection


⚑ Features

  • DNS Latency Benchmarking β€” Measure DNS response times across resolvers
  • DoH (DNS-over-HTTPS) Performance Testing β€” Encrypted DNS performance analysis
  • Cloudflare Trace Analysis β€” View your PoP location and connection details
  • WARP Detection & Mode Identification β€” Detect if WARP is active and its mode
  • Resolver Benchmarking β€” Compare performance: Cloudflare, Google, Quad9, NextDNS
  • Network Health Scoring β€” Weighted scoring system for overall network quality
  • Developer Console Mode β€” Advanced diagnostics for technical users
  • Multiple Export Formats β€” JSON, JSONL, Minified, Pretty-printed output
  • Local Log Storage β€” All logs stored locally with encryption-style encoding
  • Automatic Log Cleanup β€” Manage storage with automated cleanup
  • Cross-Platform Output β€” Compatible across iOS and macOS
  • Error-Resilient Fallback Logic β€” Graceful degradation on network issues

πŸ—οΈ Architecture

The tool is built on a modular diagnostic engine with clear separation of concerns:

Layer Purpose Implementation
Network Layer Core connectivity tests URLSession-based requests
Trace Layer Cloudflare metadata parsing PoP + WARP detection
Benchmark Layer Multi-resolver performance Timed DNS/DoH tests
Health Layer Network quality assessment Weighted scoring algorithm
Export Layer Multiple output formats JSON encoder with format options
Logging Layer Secure local storage Base64-encoded encrypted-style logs

πŸ“¦ Output Formats

Export your diagnostic results in multiple formats:

  • JSON β€” Standard JSON format
  • JSONL β€” JSON Lines (one object per line)
  • Minified JSON β€” Compact, no whitespace
  • Pretty JSON β€” Human-readable with formatting
  • MasterDict β€” Structured dictionary output
  • Developer Console β€” Formatted terminal output

πŸ” Privacy & Security

This tool is designed with absolute privacy as a core principle:

βœ… No data collection

  • No analytics tracking
  • No remote logging servers
  • No external data transmission
  • No unique identifiers

βœ… Complete control

  • All logs stored locally on your device
  • Export only what you choose
  • Delete logs anytime
  • No cloud sync

βœ… Transparent

  • Open-source design
  • Auditable code paths
  • No hidden network requests

πŸ“‹ System Requirements

iOS Version

  • Minimum: iOS 15.0 or later
  • Recommended: iOS 16.0+ for best performance
  • Device: iPhone or iPad

SwiftUI App Version (macOS)

  • Minimum: macOS 12.0 Monterey or later
  • Recommended: macOS 13.0+ (Ventura or later)
  • Architecture: Apple Silicon or Intel

Development Requirements

  • Xcode 14.0 or later
  • Swift 5.7+
  • CocoaPods (for dependencies)

πŸ› οΈ Installation

Option 1: iOS Shortcut (Fastest)

  1. Download the .shortcut file from the repository
  2. Open Apple Shortcuts app
  3. Tap "+" β†’ "Add Shortcut"
  4. Select "Import" and choose the .shortcut file
  5. Run immediately or add to your home screen

No coding required. Works on iOS 15+


Option 2: SwiftUI App (Full Features)

Clone the Repository

git clone https://github.com/hyrated117-svg/Cloudflare-Network-Diagnostic-Tool-v1.0.git
cd Cloudflare-Network-Diagnostic-Tool-v1.0

Install Dependencies

pod install

Open in Xcode

open *.xcworkspace

Or directly open Cloudflare Network Diagnostic Tool.xcodeproj in Xcode.

Build & Run

  1. Select your target device (iPhone simulator or connected device)
  2. Press Cmd + R to build and run
  3. The app will launch automatically

πŸš€ Quick Start

Using the iOS Shortcut

  1. Open the Shortcuts app
  2. Find "Cloudflare Network Diagnostic"
  3. Tap to run
  4. View results in the output panel
  5. Tap Export to save or share results

Using the SwiftUI App

  1. Launch the app from your home screen or Xcode
  2. Tap "Run Diagnostics"
  3. Wait for tests to complete (typically 10-30 seconds)
  4. Review results in the dashboard
  5. Export results via the "Export" button

πŸ“Š Example Output

Shortcut/Console Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  CLOUDFLARE NETWORK DIAGNOSTIC REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

πŸ“ TRACE INFORMATION
   IP Address: 203.0.113.42
   Country: United States
   Cloudflare PoP: LAX
   Timezone: America/Los_Angeles

πŸ” DNS BENCHMARKS
   Cloudflare: 12ms
   Google: 18ms
   Quad9: 15ms
   NextDNS: 22ms

πŸ›‘οΈ WARP Status: Connected (WARP+)

πŸ“Š HEALTH SCORE: 8.5/10 βœ…

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

JSON Export Example

{
  "timestamp": "2025-06-13T14:32:00Z",
  "trace": {
    "ip": "203.0.113.42",
    "country": "United States",
    "cloudflare_pop": "LAX",
    "warp_enabled": true,
    "warp_mode": "WARP+"
  },
  "benchmarks": {
    "cloudflare_dns": 12,
    "google_dns": 18,
    "quad9_dns": 15,
    "nextdns": 22
  },
  "health_score": 8.5
}

βš™οΈ Configuration

Export Settings

  • Choose format: JSON, JSONL, Minified, or Pretty
  • Automatic filename with timestamp
  • Share via AirDrop, email, or cloud storage

Log Management

  • Logs stored in app's local Documents directory
  • Automatic cleanup after 30 days (configurable)
  • Manual deletion available anytime

Diagnostic Options (Developer Mode)

  • Enable verbose logging
  • Custom resolver list
  • Extended trace analysis
  • Performance metrics

πŸ› Troubleshooting

Issue: "Cannot connect to network"

  • Solution: Check your internet connection
  • Ensure WiFi or cellular is enabled
  • Try again in a few seconds

Issue: "DNS tests timing out"

  • Solution: Normal on slow networks
  • Try reducing the number of resolvers tested
  • Check if your ISP blocks DNS queries

Issue: "App crashes on startup"

  • Solution: Reinstall the app
  • Delete app from device, then re-download
  • Ensure you're on iOS 15+ or macOS 12+

Issue: "Cannot export results"

  • Solution: Check available storage
  • Try a different export format
  • Restart the app

For additional support, check the Issues page.


🀝 Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Guidelines

  • Follow Swift style conventions
  • Add comments for complex logic
  • Test thoroughly before submitting
  • Keep PRs focused on a single feature
  • Update documentation as needed

πŸ—ΊοΈ Roadmap

v1.0 (Current)

βœ… DNS benchmarking βœ… DoH performance testing βœ… Cloudflare Trace integration βœ… WARP detection βœ… Network health scoring βœ… Multi-format export

v1.1 (Planned)

  • Packet loss detection
  • Latency variance analysis
  • Historical trend tracking
  • Scheduled automated tests
  • Custom resolver support

v2.0 (Future)

  • Web dashboard
  • Real-time monitoring
  • Network anomaly alerts
  • Comparative reports
  • API integration

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

You are free to use, modify, and distribute this software, provided you include the original license and copyright notice.


πŸ“ž Support


❀️ Acknowledgments

  • Built with Swift and SwiftUI
  • Powered by Cloudflare DNS and Trace APIs
  • Inspired by network diagnostic best practices

Cloudflare Network Diagnostic Tool β€” Transparent. Private. Powerful.

Made with ❀️ by the community | v1.0 (Pre-release) | Last updated: June 2025

Releases

Packages

Used by

Contributors

Languages