A powerful and comprehensive tool for validating IP proxies, running as a serverless Cloudflare Worker. This application allows you to check single IPs, domains, lists of IPs from a file URL, or entire IP ranges. It provides detailed results, including latency, geographic information, and a fraud risk score from the Scamalytics API.
- Architecture Overview
- Key Features
- Prerequisites
- 🚀 Installation and Deployment Guide
- Step 4: Verify and Use Your Application
- Troubleshooting
The system consists of three main components that work together:
- Frontend UI: A static web page served by Cloudflare Pages. This is where you interact with the application, enter the IPs or domains to check, and see the results.
- Cloudflare Worker: The core logic of the application. It handles incoming requests from the frontend, manages the user interface, and communicates with the backend services for complex tasks.
- Backend API: An external service responsible for performing the actual TCP connection test to the proxy IPs. This is crucial because Cloudflare Workers have limitations on making arbitrary outbound TCP connections. This API can be deployed on Vercel or a personal server.
Workflow:
User Frontend UI (Cloudflare Pages) Cloudflare Worker ➡️ Backend API & Scamalytics API
- Multiple Input Formats: Check a single IP, a list of IPs/domains, an IP range (CIDR or hyphenated), or a URL to a raw text/csv file.
- Fraud Risk Analysis: Integrates with the Scamalytics API to provide a risk score (
low,medium,high) for each IP. - Detailed Information: Get latency (ping), country, and ASN (organization) for every successful proxy.
- Modern & Responsive UI: A clean, user-friendly interface with dark mode support.
- High Availability: Uses a fallback mechanism, allowing you to specify multiple backend API endpoints for redundancy.
- Fully Serverless: The entire stack can be run on serverless platforms (Cloudflare and Vercel) for scalability and low maintenance.
Before you begin, ensure you have the following:
- A Cloudflare account.
- A GitHub account.
- A Vercel account (if you choose Option A for the backend).
- A VPS/Server with Python and Pip installed (if you choose Option B for the backend).
Follow these steps carefully to get your proxy checker up and running.
The Cloudflare Worker needs a backend service to check proxies. Choose one of the following two options.
This is the easiest method and requires no server management.
- Go to the Backend API Repository: Navigate to ProxyIP-Checker-vercel-API.
- Deploy the Project: Click the "Deploy" button on the repository's README. Vercel will guide you to create a copy of the project and deploy it automatically.
- Get Your URL: Once the deployment is complete, Vercel will assign a production URL to your project (e.g.,
https://my-proxy-api.vercel.app). - Save this URL! You will need it in Step 3.
Use this option if you have your own server and want full control.
-
SSH into your server and clone the repository:
git clone [https://github.com/mehdi-hexing/ProxyIP-Checker-API.git](https://github.com/mehdi-hexing/ProxyIP-Checker-API.git) cd ProxyIP-Checker-API -
Install dependencies:
pip install -r requirements.txt
-
Run the API inside a
screensession. This ensures the API keeps running even after you disconnect from the server.screen -S my_api_sessioncreates a new session.screen -S proxy-api python main.py --port 8080
(You can use any port you like. Just make sure it is open in your server's firewall.)
-
Detach from the screen session by pressing
Ctrl+A, thenD. The API is now running in the background. -
Get Your URL: Your API endpoint will be
http://<YOUR_SERVER_IP>:8080. -
Verify it's working by running this command from your local machine or another terminal:
curl http://<YOUR_SERVER_IP>:8080/api/v1/check?proxyip=1.1.1.1
You should receive a JSON response. Save this URL!
For the fraud risk score feature, you need a free API key from Scamalytics.
- Register: Go to Scamalytics.com and sign up for a Free account. The free plan provides 5,000 queries per month.
- Confirm Your Email: You will receive a confirmation email. Click the link inside to verify your account.
- Justify API Usage: You may be asked to provide a reason for needing API access. A simple explanation like "For a personal project to check proxy IP security" is sufficient.
- Wait for Approval: API key activation is a manual process and can take up to 24 hours.
- Get Your Credentials: Once approved, log in to your Scamalytics dashboard and find your Username and API Key. Save these for the next step.
Now you will connect your backend API and Scamalytics keys to the main worker code and deploy it.
-
Open the
_worker.jsfile in a text editor. -
Find the
apiUrlsarray inside thecheckProxyIPfunction. -
Replace the placeholder URLs with the URL(s) of the backend API you deployed in Step 1. You can add more than one URL for fallback redundancy.
Before:
const apiUrls = [ `http://proxy-ip-checker-vercel-api.vercel.app/api/v1/check?proxyip=${encodeURIComponent(proxyIPInput)}`, `http://23.27.249.18:9782/api/v1/check?proxyip=${encodeURIComponent(proxyIPInput)}` ];
After (Example using your own URLs):
const apiUrls = [ `https://my-proxy-api.vercel.app/api/v1/check?proxyip=${encodeURIComponent(proxyIPInput)}`, // Your Vercel URL `http://198.51.100.10:8080/api/v1/check?proxyip=${encodeURIComponent(proxyIPInput)}` // Your Self-hosted URL ];
- Create a ZIP file: Compress the project folder containing your modified
_worker.jsfile into a single.ziparchive. - Navigate to Cloudflare: Log in to your Cloudflare dashboard.
- Go to Pages: In the sidebar, go to
Workers & Pages. - Create a New Application: Click on
Create application, then select thePagestab, and finally clickUpload assets. - Upload: Give your project a name and drag-and-drop your
.zipfile into the upload box. - Deploy: Click
Deploy site.
- After the deployment is initiated, go to your new project's Settings tab.
- Select Environment variables from the settings menu.
- Add the following variables using the credentials you saved from Step 2.
| Variable Name | Value | Required |
|---|---|---|
SCAMALYTICS_USERNAME |
Your Scamalytics username | Yes |
SCAMALYTICS_API_KEY |
Your Scamalytics API key | Yes |
SCAMALYTICS_API_BASE_URL |
Your Scamalytics Base URL | Yes |
- After adding the variables, go to the Deployments tab and re-deploy the latest version to apply the new settings.
Your proxy checker should now be live!
- Visit the URL: Go to the URL provided by Cloudflare Pages (e.g.,
https://your-project-name.pages.dev). - Test It: Try checking a known proxy IP like
1.1.1.1to see if you get a result. - Use Different Paths: You can also test different functionalities directly via URL paths:
- Multiple IPs:
https://your-project.pages.dev/proxyip/1.1.1.1,8.8.8.8 - IP Range:
https://your-project.pages.dev/iprange/1.1.1.0/24 - File URL:
https://your-project.pages.dev/file/https://raw.githubusercontent.com/user/repo/main/ips.txt - Domain:
https://your-project.pages.dev/domain/google.com
- Multiple IPs:
If you encounter issues, check the following common problems:
-
"API check failed" Error:
- Verify that your backend API (Vercel or self-hosted) is running and accessible. Check its logs for errors.
- If self-hosting, ensure the port is open in your server's firewall.
- Double-check that you correctly replaced the URLs in the
_worker.jsfile.
-
Risk Score is "N/A" or shows an error:
- Go to your Cloudflare project's settings and ensure the
SCAMALYTICS_USERNAMEandSCAMALYTICS_API_KEYenvironment variables are set correctly (no typos or extra spaces). - Log in to your Scamalytics account and confirm that your API key has been approved and activated.
- Go to your Cloudflare project's settings and ensure the
-
Cloudflare Worker Errors (e.g., 500 Internal Server Error):
- This often happens if environment variables are missing. Redeploy your project after ensuring all required variables are set.
- Check the logs for your worker in the Cloudflare dashboard for more specific error details.