Proxy Checker

How the proxy checker works

Brief: Asynchronous proxy checker using aiohttp and aiohttp_socks with multiple protocols (HTTP, HTTPS, SOCKS4, SOCKS5).

Setup

  • Defines constants for concurrency, timeout, and default headers.
  • Supports multiple default IP-check services (ip-api.com, ipinfo.io, etc.)
  • with per-service validators.
  • Global state for validated logs, working proxies by protocol and service, and
  • bad proxies.

    Parsing

    parse_proxy_line() and format_proxy() handle multiple proxy formats (ip:port, ip:port:user:pass, http://ip:port, proto://user:pass@ip:port, etc.).

    check_single_protocol()

  • Parses proxy line, builds a URL depending on protocol.
  • Uses ProxyConnector for SOCKS and TCPConnector for HTTP/HTTPS.
  • Checks the proxy against all target services asynchronously.
  • Records results as success/fail, and collects working proxies by protocol and
  • service.

    User input functions

  • Load proxy file.
  • Select protocols (HTTP, HTTPS, SOCKS4, SOCKS5, or all).
  • Optionally set a custom URL for checking.
  • Choose output format for proxies (ip:port, ip:port:user:pass, etc.).
  • Main entry

  • Prints header.
  • Loads proxies and user options.
  • Runs asynchronous check and saves results.

Key features

High concurrency, protocol detection, multi-service validation, flexible proxy input/output formats, and detailed result logging.

..