Skip to content

paulGUZU/cf-fastly-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HTTP IP Scanner for CDN Ranges (Cloudflare & Fastly)

πŸš€ A multi-threaded IP scanner that sends HTTP requests to random IPs from popular CDN ranges.
This tool helps you discover responsive IPs that can be used in V2Ray or other proxy setups to achieve faster, more stable connections.


✨ Features

  • πŸ“‘ Generates random IPs inside predefined Cloudflare and Fastly IP ranges (both are always used together).
  • ⚑ Uses HTTP GET requests to quickly test responsiveness (ignores HTTP status codes).
  • πŸš€ Multi-threaded scanning for high performance.
  • πŸ“Š Displays a live progress bar with tqdm.
  • πŸ“ Automatically saves responsive IPs with their response times into a timestamped CSV file.

❓ Why Not Use Ping?

We intentionally avoid ICMP ping. Under Iran’s firewall, ping often yields false positives β€” an IP might show a very low latency with ping but give extremely poor speeds (or fail altogether) when used with XHTTP or WebSocket in V2Ray.

This scanner tests actual HTTP requests, giving a more realistic picture of usable IP performance.


βš™οΈ Installation

Requires Python 3.7+.

Install dependencies:

pip3 install -r requirements.txt

πŸš€ Usage

Run the script:

python3 main.py

You will be prompted to:

  • Which network to test? [fastly/cloudflare]:
  • Enter the number of random IPs to test (e.g. 5000)
  • Set the number of parallel worker threads (recommend: CPU cores Γ— 2)
  • Set the HTTP timeout in seconds (e.g. 3)

Example interactive session:

Which network to test? [fastly/cloudflare]: fastly
Enter number of IPs to check: 100
Enter number of worker threads [recommended 8]: 2
Enter timeout in seconds [default 1]: 22

It will show a progress bar and save results to a file like:

results_2025-06-28_16-15-42.csv

πŸ“‚ Output

CSV file with:

IP Address Response Time (seconds)
104.16.0.1 0.35
172.64.1.2 0.27
... ...

You can use these responsive IPs in your V2Ray or Xray configuration for faster connections.


⚠️ Disclaimer

  • This script does not inspect HTTP status codes β€” it only checks for timeout vs. no timeout.
  • Use responsibly. Designed for research and optimizing your own proxy setups.

πŸ“œ License

MIT License.


About

IP scanner based on HTTP requests

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages