How to test the latency and success rate of your proxies
requests
: To send HTTP requests.matplotlib
: To plot the test results.numpy
: To calculate statistical values.collections
: To count occurrences of error messages.use_socks5
flag to True
or False
.
use_socks5 = True
:
use_socks5 = False
:
username
and password
with your actual credentials.
ThreadPoolExecutor
to send requests concurrently. Each request is timed, and the status code and latency are recorded.
fetch_url(i)
handles sending each request and logs either a successful status code or an error (timeout or other exceptions).
Which proxy protocols are supported by the script?
use_socks5
variable to True
for SOCKS5 or False
for HTTPS.What is the difference between rotating and sticky ports?
How many requests should I send to get accurate results?
What is the role of `ThreadPoolExecutor` in the script?
ThreadPoolExecutor
allows the script to send requests concurrently, improving efficiency and speed. By utilizing multiple threads, the script can handle several requests at the same time, simulating real-world use cases where many requests are sent in parallel.What do the different markers in the latency graph represent?
How do I interpret the statistics displayed after the test?
Can I change the target URL for testing?
ip-api.com
) with any URL you wish to test. Just modify the url
variable in the script.What should I do if the script encounters a timeout or error?
How do I analyze the results and take action?
Why is the test result for different gateways different?