
A concurrent and efficient proxy checker for testing HTTP, SOCKS4, and SOCKS5 proxies, using multi-threading and automatic retry mechanisms.
Features • Installation • Usage • Configuration • Troubleshooting • ContributingProxyChecker is a Python tool designed to verify the functionality of a list of HTTP, SOCKS4, and SOCKS5 proxies by sending test requests. It supports concurrent requests for efficient performance, with configurable parameters to control timeouts, retry attempts, and the number of concurrent workers.
- Multi-threaded Proxy Checking: Uses Python's
ThreadPoolExecutor
for concurrent proxy testing. - Configurable Timeout and Retries: Customize timeout per request and retry logic to handle intermittent network issues.
- Supports HTTP, SOCKS4, SOCKS5 Proxies: Works with multiple proxy types and fetches proxies from configurable URLs.
- Automatic Output Saving: Saves lists of working proxies for each type in a dedicated directory.
- GUI and Console Modes: Run with a user-friendly PyQt6 interface or via command-line arguments.
- Python 3.6 or later
requests
package for handling HTTP requestsPyQt6
package for the GUI (if you plan to run the GUI mode)
-
Clone the repository:
git clone https://github.com/Jesewe/proxy-checker.git cd proxy-checker
-
Install the required packages:
pip install -r requirements.txt
(If you don't have a
requirements.txt
, you can install the necessary packages manually:)pip install requests PyQt6
To launch the graphical user interface, run:
python proxy-checker.py
This will open a window where you can configure parameters (e.g., timeout, max retries, retry delay, and max workers), select proxy types to check, and view live progress logs.
To run ProxyChecker in console mode (without the GUI), use the --console
flag:
python proxy-checker.py --console
You can also customize settings via command-line arguments, for example:
python proxy-checker.py --console --timeout 5 --max-retries 4 --retry-delay 2.0 --max-workers 100
You can configure the following parameters in the ProxyChecker
class or pass them as command-line arguments:
- proxy_urls: Dictionary of URLs to fetch proxy lists for HTTP, SOCKS4, and SOCKS5.
- timeout: Timeout for each proxy request (default: 1 second).
- max_retries: Maximum retry attempts if fetching proxies fails (default: 3).
- retry_delay: Delay between retries (default: 1.0 seconds).
- max_workers: Maximum number of concurrent threads for proxy checking (default: 50).
Example of custom initialization:
proxy_urls = {
"http": "https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt",
"socks4": "https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt",
"socks5": "https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks5.txt"
}
checker = ProxyChecker(proxy_urls, timeout=2, max_retries=5, retry_delay=1.5, max_workers=50)
checker.run()
- Connection Errors: If you see multiple connection errors, consider lowering
max_workers
or increasingtimeout
. - Empty Output: If the output files are empty, verify that the proxy URLs are accessible and returning valid proxy lists.
- Network Limits: Avoid setting very high concurrency (e.g.,
max_workers=100
) as it may cause network throttling or rate-limiting issues.
Contributions are welcome! Please fork the repository and submit a pull request with your enhancements or bug fixes. Ensure your code adheres to the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.