The proxy-checker project is an automated tool designed to help you validate and classify proxy servers from an input list. The process involves several scripts that work together sequentially, with each one focusing on a specific part of the proxy-checking workflow.
Here is the structure of the proxy-checker project with additional explanations for each file and directory:
/proxy-checker
|-- .env # Environment variables file for configuration settings
|-- .gitignore # Files to be ignored by git (such as sensitive information or large data)
|-- data # Folder for storing input and output data
| |-- geolite
| | -- GeoLite2-ASN.mmdb # Database file used for ASN (Autonomous System Number) lookup
| |-- input
| | -- proxies.txt # Input file containing the list of proxies to be validated
| -- output
| -- live_proxies.txt # Output file containing proxies that are found to be live after validation
|-- requirements.txt # Python dependencies required to run the scripts
|-- pictures # Folder containing illustrative images
| -- fetch_proxies.png # Diagram showing the workflow of fetching proxies
| -- check_proxies.png # Diagram for the proxy-checking process
| -- classify_proxies.png # Diagram for classifying proxies
| -- telegram_send.png # Diagram for sending results to Telegram
-- scripts # Folder containing all project scripts
|-- classify_proxies.py # Python script to classify proxies into different categories based on various criteria
|-- docker_proxy_check.sh # Bash script to check the status of proxies using Docker and mubeng
|-- fetch_proxies.sh # Bash script to fetch proxies from a given URL
|-- main.py # Main script for central control (optional)
|-- run_scripts.sh # Bash script to run all necessary scripts for the workflow in sequence
|-- send_to_telegram.py # Python script to send information about the proxies to Telegram channels- Fetch Proxies (
fetch_proxies.sh): Fetches a list of proxy servers from a provided URL and saves it toproxies.txt. - Check Proxy Live Status (
docker_proxy_check.sh): Uses Docker andmubengto check if the proxies are alive, saving the live proxies intolive_proxies.txt. - Classify Proxies (
classify_proxies.py): Classifies proxies based on categories such as residential, ASN, geographical region, and risk level. This script utilizes APIs like IPINFO and PROXYCHECK. - Send Notification (
send_to_telegram.py): Sends classified proxy information to specified Telegram topics or channels.
sequenceDiagram
participant Fetch as fetch_proxies.sh
participant Check as docker_proxy_check.sh
participant Classify as classify_proxies.py
participant Notify as send_to_telegram.py
Fetch->>Check: Fetch proxies
Check->>Classify: Check live status
Classify->>Notify: Classify and send results
You need to have the following installed on your system before starting:
- Python (>= 3.8) π
- Docker π³
- git
- curl
Clone the project repository from GitHub:
git clone https://github.com/tamld/proxy-checker.git
cd proxy-checkerTo keep dependencies isolated, create a virtual environment:
python -m venv venvActivate the virtual environment: Linux/Mac:
source venv/bin/activateWindows:
venv\Scripts\activateUse pip to install the necessary dependencies from requirements.txt:
pip install -r requirements.txt-
To get the Channel ID and Topic ID for sending Telegram notifications:
- Search for @MissRose_bot in Telegram.
- Add it as an administrator to your channel or group.
- Type
/idin the channel or group. - @MissRose_bot will reply with the Channel ID and Topic ID.
-
Get API ipinfo.io
-
Get API proxychecker.io
Create a .env file to store the configuration variables, such as:
# API Keys for third-party services
IPINFO_API_KEY="" # API key for IPinfo.io to get information about IP addresses
PROXYCHECK_API_KEY="" # API key for ProxyCheck.io to check proxy risk levels
# File paths for storing results and database files
BASE_PATH="/root/proxy-checker/data" # Base path for all data files
PROXIES_FILE="${BASE_PATH}/input/proxies.txt" # Path to the proxy list input file
LIVE_PROXIES_FILE="${BASE_PATH}/output/live_proxies.txt" # Path to store the list of live proxies
CHECKED_PROXIES_FILE="${BASE_PATH}/output/checked_proxies.txt" # Path to store the list of checked proxies
RESIDENTIAL_PROXIES_FILE="${BASE_PATH}/output/residential_proxies.txt" # Path to store the list of residential proxies
# GeoLite2 Database Paths (Will be downloaded during execution)
BASE_URL="https://github.com/P3TERX/GeoLite.mmdb/raw/download" # Base URL to download GeoLite2 databases
ASN_DB_URL="${BASE_URL}/GeoLite2-ASN.mmdb" # URL for downloading ASN database
ASN_DB_PATH="${BASE_PATH}/geolite/GeoLite2-ASN.mmdb" # Path to the ASN database
# Telegram Bot Token for notifications (Optional)
TELEGRAM_BOT_TOKEN="" # Telegram bot token for sending messages (leave empty if not used)
TELEGRAM_CHANNEL="" # Telegram Channel. Start with -
TELEGRAM_RES_TOPIC="" # Topic ID for Residential Proxies
TELEGRAM_CHECKED_TOPIC="" # Topic ID for Checked Proxies
chmod +x ./scripts/run_scripts.sh
./scripts/run_scripts.shThis will execute the following:
- Fetch proxies.
- Check their live status.
- Classify them.
- Send the results via Telegram.
The proxy-checker project automates the validation, classification, and notification of proxy information. By following this guide, you can set up the environment, run each script individually, or automate the entire process.
Feel free to extend the project by adding more sources, integrating new API services, or refining the classification process.



