Skip to main content

prox-checker

Async python proxy checker

Features

  • Works in 2023
  • No pycurl needed, OS independent
  • HTTP, Socks4, Socks5
  • Async
  • Fast (<= 1.5kb per check)
  • Checks availability and anonymity
  • Secure, no data collecting
  • Typed

Installation

pip install prox-checker

Usage

...

from prox_checker import ProxyChecker, ProxyProtocol, ProxyCheckerResult


async def check_my_proxies():
    proxies = [
        '144.24.207.98:8080',
        '103.169.130.51:5678',
        '198.58.126.147:51576',
        '45.79.155.9:3128',
        '206.220.175.2:4145',
    ]

    working_proxies: List[ProxyCheckerResult] = await ProxyChecker().check_proxies(
        proxies=proxies,
        proxy_async_limit=1_000,
        protocol_async_limit=3,
        response_timeout=5,
    )

    print(working_proxies)
    '''
    Output: 
    [
        <ProxyCheckerResult url=http://144.24.207.98:8080 proxy=144.24.207.98:8080 protocol=ProxyProtocol.http>, 
        <ProxyCheckerResult url=socks4://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks4>, 
        <ProxyCheckerResult url=socks5://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks5>,
        <ProxyCheckerResult url=socks4://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks4>, 
        <ProxyCheckerResult url=socks5://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks5>
    ]
    
    Leaves only anon working proxies, separated by protocols
    '''
    socks5_urls = [
        result.url
        for result in working_proxies
        if result.protocol == ProxyProtocol.socks5
    ]
    print(socks5_urls)  # ['socks5://198.58.126.147:51576', 'socks5://206.220.175.2:4145']

    max_bandwidth_bytes_s = ProxyChecker.estimate_max_bandwidth_bytes_s(
        proxy_async_limit=1_000,
        protocol_async_limit=3,
    )
    max_bandwidth_mb_s = max_bandwidth_bytes_s / 1024 / 1024
    print(max_bandwidth_mb_s)  # 4.39453125

    custom_judges = [
        'http://proxyjudge.us',
        'http://azenv.net/',
    ]
    custom_judges_working_proxies = await ProxyChecker(judges=custom_judges).check_proxies(
        proxies=proxies,
        proxy_async_limit=1_000,
        protocol_async_limit=3,
        response_timeout=5,
    )
    print(custom_judges_working_proxies)  # same as first

...

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prox_checker-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prox_checker-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file prox_checker-0.1.0.tar.gz.

File metadata

  • Download URL: prox_checker-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Windows/10

File hashes

Hashes for prox_checker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7ecf0cfd9dc69d9f8adf3a510e0c27d3b78aa285b703ad106b846f053411731
MD5 db4977a0774208bfc5f56ae646e12eb9
BLAKE2b-256 555df4d23fc3ec72b4d7cedfea446938650fc03e9d4140992ce40d7f249bcb06

See more details on using hashes here.

File details

Details for the file prox_checker-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prox_checker-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Windows/10

File hashes

Hashes for prox_checker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3029157d910b78da20f2bc82f312edc903bef2bf2b075512762dd19f768a7a06
MD5 266d773ba6314844ca41cd883c4bda89
BLAKE2b-256 29fafad0f4d5e95d0e6dac4d3aa2a7ca2142e2f1b97f8ebe67c0b93e85ebade3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page